Oracle Developer Tools for VS Code - Proxy User connections — oracle-tech

    Forum Stats

  • 3,715,954 Users
  • 2,242,917 Discussions
  • 7,845,700 Comments

Discussions

Howdy, Stranger!

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

Oracle Developer Tools for VS Code - Proxy User connections

Robert Marz
Robert Marz Member Posts: 3

Hi,

we are heavily using proxy connections at our site - every developer connects with his personal user and the desired schema in square brackets:

alter user hr grant connect through scott;

connect scott[hr]/tiger

And you are connected to the schema hr.

Unfortunately, this doesn't seem to work with Oracle Developer Tools for VS Code 19.3.2.

Am I doing something wrong?

Regards from Germany

Robbie

Best Answer

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited April 2020 Accepted Answer

    Hi Robbie,

    We plan to make this a lot easier in the next release by giving Proxy Authentication it's own section in the connection dialog. But in this release you will need to use an "ODP.NET connection string".

    Here are the steps to follow:

    • 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

Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited April 2020 Accepted Answer

    Hi Robbie,

    We plan to make this a lot easier in the next release by giving Proxy Authentication it's own section in the connection dialog. But in this release you will need to use an "ODP.NET connection string".

    Here are the steps to follow:

    • 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
  • Robert Marz
    Robert Marz Member Posts: 3
    edited April 2020

    Hi Christian,

    thanks for yout fast response, this works perfect.

    The only downside is, that you have to store your password. But thats fine for me.

    Even easier than an own section for proxy connect would be, if the "square-bracket-syntax" would work, e.g. scott[hr].

    SQLDeveloper works that way.

    Robbie

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

    A much easier way to use proxy authentication is now available in the new 19.3.3 version. Please try it out and let me know what you think.

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

    Robbie Databee
  • Robbie Databee
    Robbie Databee Member Posts: 1 Blue Ribbon

    The new connection dialogs look realy great - proxy connect works like expected.

    Thanx a lot.

    Next Problem: How Do I connect to an ADB in the cloud? Where do I put the wallet, how Do I reference it?

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

    Hi Robbie,

    Check out the quickstart for an FAQ you may have:

    • Obtain your Client Credentials File: Go to the Administration Console for your Oracle Autonomous Database and click Download Client Credentials.  Alternatively, obtain the credentials file from your administrator.
    • Unzip the credentials files into the directory that is set as Config Files Folder in the Oracle Developer Tools for VS Code Extension Settings. By default this location is ~/Oracle/network/admin on Linux and Mac and %USERPROFILE%\Oracle\network\admin on Windows.
    • 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 TNS Alias
    • Make sure the TNS Admin Location field is set to the directory where you unzipped your credentials files. If not, change it.
    • Check the Use Wallet File checkbox
    • Make sure the Wallet File Location field is set to the directory where you unzipped your credentials files. If not, change it.
    • Select the alias name you wish to connect to, for example mydb_high, from the TNS Alias dropdown list.
    • Select Non-Administrator from the Role drop down list
    • Enter the username and password. (If you are new to Oracle Autonomous Database, use username ADMIN)
    • If you are using Proxy Authentication, check the Show more options checkbox and provide the proxy username and password
    • If you want to use a different schema than the default schema associated with your username, select it from the Current Schema dropdown
    • Provide a connection name to be used to reference this connection in Database Explorer and elsewhere
    • Click the Create Connection button
    • If you are using macOS, and receive a Connection request timed out error when trying to connect, please update .NET Core Runtime to version 3.1. Any other version is not sufficient.


  • 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.