Forum Stats

  • 3,840,134 Users
  • 2,262,571 Discussions
  • 7,901,154 Comments

Discussions

How to declare a Oracle connexion using OID ?

Hello community,

We're getting rid of TNS and I was wondering how I should change my connexions declaration in the Oracle Extension for VSCode.

Thanks for your help.

Regards,

Bob

Best Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,169 Employee
    Answer ✓

    Hi Bob,

    Are you using LDAP? If so, here is an excerpt from the quickstart:


    • Connections using a directory server (LDAP) are now supported on all platforms (Windows, MacOS, and Linux).
    • Copy the LDAP.ORA and SQLNET.ORA files that you want to use into the directory that is set as Config Files Folder in the Oracle Developer Tools for VS Code Extension Settings, or change this setting as desired. 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. Then select New Connection.
    • 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 your LDAP.ORA and SQLNET.ORA files are located. If not, change it.
    • In the TNS Alias field, type in the database service name.
    • Select the database role from the Role drop down list
    • Enter the username and password
    • If you are using Proxy Authentication, check the Show more options checkbox and provide the proxy username and password
    • If you wish to use a different schema than the default schema associated with your username, check the Show more options checkbox and select the schema name 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


    BobMilli
  • BobMilli
    BobMilli Member Posts: 8 Green Ribbon
    Answer ✓

    Thanks a lot Christian !

    I should have RTFM better :-)

    It works like a charm.

    Bob

Answers

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 2,169 Employee
    Answer ✓

    Hi Bob,

    Are you using LDAP? If so, here is an excerpt from the quickstart:


    • Connections using a directory server (LDAP) are now supported on all platforms (Windows, MacOS, and Linux).
    • Copy the LDAP.ORA and SQLNET.ORA files that you want to use into the directory that is set as Config Files Folder in the Oracle Developer Tools for VS Code Extension Settings, or change this setting as desired. 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. Then select New Connection.
    • 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 your LDAP.ORA and SQLNET.ORA files are located. If not, change it.
    • In the TNS Alias field, type in the database service name.
    • Select the database role from the Role drop down list
    • Enter the username and password
    • If you are using Proxy Authentication, check the Show more options checkbox and provide the proxy username and password
    • If you wish to use a different schema than the default schema associated with your username, check the Show more options checkbox and select the schema name 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


    BobMilli
  • BobMilli
    BobMilli Member Posts: 8 Green Ribbon
    Answer ✓

    Thanks a lot Christian !

    I should have RTFM better :-)

    It works like a charm.

    Bob

  • Glad to hear, Bob! Our Connection Dialog UI for an LDAP connection is not exactly intuitive, and we hope to change it in a coming release.