Create New Connection Error — oracle-tech

    Forum Stats

  • 3,715,830 Users
  • 2,242,890 Discussions
  • 7,845,632 Comments

Discussions

Howdy, Stranger!

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

Create New Connection Error

RakeshKr
RakeshKr Member Posts: 401

Hi, This is the first time I am trying the extension, getting this error when trying to create a connection:

Error opening connection 'DBUser.DBService'.Details: Could not load file or assembly 'System.DirectoryServices.Protocols, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

The system cannot find the file specified. Any idea what it can be?

Thanks

Mikhail.AIRakeshKr

Answers

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

    Usually this happens when you copy a SQLNET.ORA and/or LDAP.ORA from a Windows machine and try to use it on Linux. The issue is that we currently do not support LDAP on Linux.

    Please try renaming the LDAP.ORA and remove mention of LDAP from your SQLNET.ORA. Then restart Visual Studio Code.

    If that doesn't fix your problem, please post the contents of your SQLNET.ORA file here.

  • RakeshKr
    RakeshKr Member Posts: 401
    edited October 2019

    I am using Windows 10 machine, not Linux. From my laptop I can successfully make connection from tools like JDeveloper, TOAD etc.

    Contents of sqlnet.ora

    TRACE_DIRECTORY_CLIENT = c:\temp

    LOG_FILE_CLIENT = client.log

    LOG_DIRECTORY_CLIENT = c:\temp

    TRACE_FILE_CLIENT = client_trace.log

    SQLNET.EXPIRE_TIME = 0

    NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES)

    SQLNET.CRYPTO_SEED = "-1109189660"

    DISABLE_OOB=ON

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

    FYI - All of the client side connectivity code (SQLNet, etc) is different with this tool than SQLDev and Toad.

    As a test, backup sqlnet.ora, then:

    Remove LDAP from NAMES.DIRECTORY_PATH

    Rename LDAP.ORA

    Then save sqlnet.ora and restart Visual Studio Code.

  • RakeshKr
    RakeshKr Member Posts: 401
    edited October 2019

    I managed to connect to the database.

    Instead of changing the sqlnet.ora file, I connected using the "Connect using a TNSNAMES.ORA Connection Alias" method.

    Made of copy of the 2 files form %USERPROFILE%\.vscode\extensions\oracle.oracledevtools-19.3.2\sample\network to a desperate location. Updated the tnsnames.ora file to create an entry for the database I was connecting to.

    While creating connection selected TNS Alias as connection type, selected alias, entered username / password and it worked fine.

    Thanks for the help.

  • user1042438
    user1042438 Member Posts: 1
    edited January 2020

    I used a combination of the above two comments and it worked.

    I took the sqlnet.ora file from %USERPROFILE%\.vscode\extensions\oracle.oracledevtools-XXXXXXXXX\sample\network and replaced my own sqlnet.ora

    It worked after that

    Thanks guys

    Mikhail.AIRakeshKr
  • MananGajjar
    MananGajjar Member Posts: 1
    edited April 2020

    I am facing the same problem.

    I have tried all the above method but its not working for me.

    It looks like without LDAP.ORA file it is not possible to connect to the database.

    Please help me with this.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited April 2020
    MananGajjar wrote:I am facing the same problem.I have tried all the above method but its not working for me.It looks like without LDAP.ORA file it is not possible to connect to the database.Please help me with this.

    Hello, LDAP does not work with the current tools. We are hoping to fix that in an upcoming release.

    Do you require LDAP? If you are not sure, please check with your DBA.

    If you do NOT require LDAP, you can avoid this issue by removing references to LDAP from SQLNET.ORA, TNSNAMES.ORA and by renaming LDAP.ORA

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

    Support for LDAP is now available in the new 19.3.3 version. Please try it out and let me know what you think.

Sign In or Register to comment.