Forum Stats

  • 3,839,582 Users
  • 2,262,507 Discussions


Logging on with proxy user

NiceTheoryVidar Member Posts: 2 Green Ribbon

Really looking forward to test this extension. But:

It seems that logging on with a proxy user (user_A[user_B]) does not work. Connecting to user_A or user_B works, but proxy through gives bad username or password. It works in SQL Developer, so the accounts are correctly set up.

Any workarounds?




  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,168 Employee
    edited Jun 24, 2019 1:58AM


    For now you will need to use a ODP.NET connect string if you want to use proxy authentication. We'll try to improve this soon:

    Use option "New Connection"

    When prompted for connect string, enter:

    User Id=testuser;Data Source=localhost/XEPDB1;Proxy User Id=myproxyuser;Proxy Password=myproxypass;

  • User_4NH2K
    User_4NH2K Member Posts: 25 Blue Ribbon

    is this still a problem? I have been struggling to get this to work for some time now. I thought I was doing it wrong.

    I am on Developer Tools for VS Code (SQL and PLSQL) 21.4.0

    As per Vidar above, how to fill in the Create New Connection page - is this below correct?

    Connection Type* : TNS Alias

    TNS Admin Location* : c:\Users\user_A

    TNS Alias : TNSAlias1

    Use Wallet : ??? none ???

    Wallet File Location : ??? not using ???

    Role : Default

    Username* : user_A

    Password : ??? do I leave this blank here ???

    ---- Show more Option ✔

    Proxy User name : user_B

    Proxy Password : ??? do I put user_A' s password ???

    Current Schema : *** error : unable to get schema information. Details: ORA-01017:......

    Connection name* : auto populated as user_B.TNSAlias1

    Clicked Create Connection - Failed with Error opening connection 'user_B.TNSAlias1': Details: ORA-01017

    But the login/password is OK. It works fine in SQL Developper and sqlplus .

    Thank you .

  • NiceTheoryVidar
    NiceTheoryVidar Member Posts: 2 Green Ribbon

    I don't know if it's fixed. I'm using DataGrip for my development work now, so this problem is not a concern for me anymore.

  • User_4NH2K
    User_4NH2K Member Posts: 25 Blue Ribbon

    actually, from what i have been searching around it should be

    Username* : user_B

    Proxy User name : user_A

    Proxy Password : user_A's password

    I have tried that too previously, and again now and it still ain't working.

    and I also tried the ODP.NET  connection way. I still cannot get this to work either,

    I have entered the conn str as mentioned above by Christian with

    testuser as user_B

    myproxyuser as user_A

    myproxypass as user_A's password

    for Source=localhost/XEPDB1, what do i put here?

    I guess I can't use TNSAlias1 but I have tried something like this which I got from the tnsnames.ora file the following entries HOST=, PORT=999999 , CONNECT_DATA = (SERVER=dedicated) (SERVICE_NAME=


    and it is still not working.

    Is this correct way?

    also , is the ODP connection string secure?

  • User_4NH2K
    User_4NH2K Member Posts: 25 Blue Ribbon

    HI Thanks Vidar

  • User_4NH2K
    User_4NH2K Member Posts: 25 Blue Ribbon


    can anyone from Oracle please comment on this ?


  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,168 Employee
    edited Mar 23, 2022 3:40PM


    This is a two year old thread. My original answer on this thread is no longer the recommended way to do this as we modified the connection dialog.

    Are you able to connect using a proxy user from SQL Developer, SQLCL or SQL*Plus? I just want to make sure it is working on this machine.

    You can test this like so:

    (connect as sysdba, then)
    create user testuser identified by passw0rd;
    grant create session to testuser;
    create user myproxyuser identified by myproxypassword;
    grant create session to myproxyuser;
    alter user testuser grant connect through myproxyuser;

    Now when you connect in the dialog you would put "testuser" in the username field. Leave password blank.

    Check the "show more options" check box.

    Put myproxyuser in the Proxy User Name field and myproxypassword in the Proxy Password Field. Then press connect.

    If you get an error, let me know what it is.

  • User_4NH2K
    User_4NH2K Member Posts: 25 Blue Ribbon

    Thank Christian, I have seen this before or may something like this which probably was wrong and confused me more. so does it mean that I can connect with a TNS Alias now or I still need to use the connection string ( if so what is the requirement to use the way)

    So, I have a user account/password and I want to connect into the database pretending to be another schema user which I do not know the password. Am I testuser or am I myproxyuser? note I do not have sysdba and the accounts are created for me. I am given only my own user (me) and password (myownpassword) and I have been set by the DBA team to be able to connect as 'useriampretending' without that password.

    I can connect with sqldev. sqlcl and sqlplus like this:

    me[userIampretending]/[email protected]

    but note in VScode via TNS Alias or connections.

    btw what is Advanced Connection string ? May be that would work for me. how to use that with the info I have?

    Thank you

  • I would suggest using the TNS Alias connection type. In User Name field put userIampretending.

    Check the "show more options" check box

    Put me in the Proxy User Name field and myownpassword in the Proxy Password Field. Then press connect.