7 Replies Latest reply on Apr 6, 2020 4:01 PM by Christian.Shay -Oracle

    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.

                • 5. Re: Create New Connection Error
                  user1042438

                  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

                  • 6. Re: Create New Connection Error
                    manangajjar

                    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.

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

                      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