Using Proxy users w/VS Code — oracle-tech

    Forum Stats

  • 3,715,959 Users
  • 2,242,917 Discussions
  • 7,845,703 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Using Proxy users w/VS Code

Scott
Scott Member Posts: 975

I tried to make a connection using a proxy user, using the following syntax:  PROXY_USER[TARGET_USER]

This works fine in SQL Developer/SQLPlus, but I get an ORA-01017: invalid username/password; login denied error in VS Code.

Running the latest build (19.3.2).

Thoughts?

- Scott -

Best Answer

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019 Accepted Answer

    Hi Scott,

    We don't support that syntax yet, but in the meantime you can do the following to connect proxy users:

    • To connect to Oracle Database from a .SQL or .PL/SQL file, press F1 to open Command Palette and select Oracle:Connect from the dropdown
    • To connect from Oracle Database Explorer, click the plus sign button
    • A connection dialog will open. In the Connection Type dropdown, select ODP.NET Connect String
    • In the Connection String field, enter a string with this format if providing the hostname, port and service name explicitly: User Id=myuser;Data Source=dbhostname:1521/DBSERVICENAME;Proxy User Id=myproxyuser;Proxy Password=myproxypass;
    • If using a TNS Alias, enter a connect string with this format: User Id=myuser;Data Source=mytnsalias;Proxy User Id=myproxyuser;Proxy Password=myproxypass;
    • Provide a connection name to be used to reference this connection in Database Explorer and elsewhere
    • Click the Create Connection button

    For more tips, see the quickstart:

    https://www.oracle.com/database/technologies/appdev/dotnet/odtvscodequickstart.html

Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited October 2019 Accepted Answer

    Hi Scott,

    We don't support that syntax yet, but in the meantime you can do the following to connect proxy users:

    • To connect to Oracle Database from a .SQL or .PL/SQL file, press F1 to open Command Palette and select Oracle:Connect from the dropdown
    • To connect from Oracle Database Explorer, click the plus sign button
    • A connection dialog will open. In the Connection Type dropdown, select ODP.NET Connect String
    • In the Connection String field, enter a string with this format if providing the hostname, port and service name explicitly: User Id=myuser;Data Source=dbhostname:1521/DBSERVICENAME;Proxy User Id=myproxyuser;Proxy Password=myproxypass;
    • If using a TNS Alias, enter a connect string with this format: User Id=myuser;Data Source=mytnsalias;Proxy User Id=myproxyuser;Proxy Password=myproxypass;
    • Provide a connection name to be used to reference this connection in Database Explorer and elsewhere
    • Click the Create Connection button

    For more tips, see the quickstart:

    https://www.oracle.com/database/technologies/appdev/dotnet/odtvscodequickstart.html

  • Scott
    Scott Member Posts: 975
    edited October 2019

    Perfect - that worked like a charm!

    - Scott -

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee

    Hi Scott,

    In our newest 19.3.3 release we made it a lot easier to connect using a proxy user. Please try it out and let me know any feedback about the release!

    (In any connection dialog, check the Show more options checkbox and provide the proxy username and password)

  • User_6BTKC
    User_6BTKC Member Posts: 12

    Hello,

    Am I being dense with the new dialog

    In the examples here

    alter user hr grant connect through scott;

    connect scott[hr]/tiger

    in the new dialog should I be entering scott in user name and scott[hr] in the proxy user name?

  • User_6BTKC
    User_6BTKC Member Posts: 12

    Ignore me all i was being dense. The proper syntax in the new dialog is

    EX alter user hr grant connect through scott;

    It is to place the target user HR in user name, and scott and scott's password in the new proxy user fields.

Sign In or Register to comment.