4 Replies Latest reply on Oct 15, 2019 2:25 PM by RakeshKr

    Create New Connection Error

    RakeshKr

      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

        • 1. Re: Create New Connection Error
          Christian.Shay -Oracle

          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.

          • 2. Re: Create New Connection Error
            RakeshKr

            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

            • 3. Re: Create New Connection Error
              Christian.Shay -Oracle

              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.

              • 4. Re: Create New Connection Error
                RakeshKr

                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.