VSCode Oracle Developer Tools - Fedora 30 — oracle-tech

    Forum Stats

  • 3,715,952 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!

VSCode Oracle Developer Tools - Fedora 30

trangelier
trangelier Member Posts: 8

Hey everyone,

First off, thanks for developing this extension, I'm very eager to use it!! I've been patiently waiting for the day I can move my simple tasks to VSCode and out of SQLDeveloper.

I'm unable to use the Oracle Developer Tools for VS Code on Fedora 30 for a connection to an Oracle database on premise. I followed the Quick Start Guide (https://www.oracle.com/database/technologies/appdev/dotnet/odtvscodequickstart.html ) and installed .NET 2.2 (https://dotnet.microsoft.com/download/linux-package-manager/fedora28/runtime-current ). I then restarted my computer.

When trying to connect via TNS, I always get the error:

"Oracle Developer Tools for VS Code: Tnsnames file is not found or there are no entries in it."

I know that the path to my TNS Names is valid as on the same workstation I use this TNS Names file for SQLCL, SQLDeveloper and Node OracleDB (and yes, I updated the path to my TNS in VSCode settings).

When trying to connect manually, I get a more detailed error message:

"Oracle Developer Tools for VS Code: Error connecting to server MY_SERVER_HOST 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."

This looks to me like a .NET error? I've never used it and can't find anything immediately useful online.

Any help would be appreciated!

trangelier

Best Answer

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited June 2019 Accepted Answer

    I believe part of the problem may be related to LDAP.  Please make a back up copy of that SQLNET.ORA, then edit it to change:

    SQLNET.AUTHENTICATION_SERVICES= (NONE)

    and then delete the NAMES.DIRECTORY_PATH line. Save the SQLNET.ORA and restart VS Code.

    Try connecting "manually" again.

    trangelier

Answers

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

    Hi there,

    Check the Oracle Developer Tools for VS Code extension settings. We have a setting for the location of this file called "Config Files Location". You can change this path to the path where you keep your tnsnames.ora, or you can copy it over to the default location. You'll need to restart VS Code if you change the location.

  • trangelier
    trangelier Member Posts: 8
    edited June 2019

    Hello Christian,

    My "Config Files Location" is already mapped to the same path as my TNS_NAMES ENV variable (which SQLDeveloper, SQLCL and node-oracledb) uses. I did this on the initial setup before restarting my entire machine.

    As I said in my initial post, I know this path is valid as all my other Oracle Developer Tools already use this path to read my TNS_NAME's entries.

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

    Just an FYI - There's a bug in this release whereby TNS_ADMIN environment variable is being read by the extension. (In future releases this will not be so.)

    It is possible this is some kind of side effect of that, even though as you said the env variable is the same. Can you please try deleting the TNS_ADMIN env variable, restarting VS Code, and trying again?

  • trangelier
    trangelier Member Posts: 8
    edited June 2019

    I commented out my TNS_ADMIN variable from my zshrc file, unset it, restarted VSCode and have the same exact issues with reading the TNS file and a manual connection.

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited June 2019
    4027466 wrote:When trying to connect manually, I get a more detailed error message:"Oracle Developer Tools for VS Code: Error connecting to server MY_SERVER_HOST 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."

    Ok, and what did you mean by "connect manually"? Can you explain?

    Can you also try using the default path for the Config Files Location and copy the TNSNAMES.ORA there and try that? (restart VS Code after changing)

    Are you using LDAP? Can you share the contents of your SQLNET.ORA? Is there a LDAP.ORA?

  • trangelier
    trangelier Member Posts: 8
    edited June 2019

    "Connect Manually"

    I apologize, that should have been explained better. I get this error when attempting to use a Connection String (Oracle: Connect -> New Connection) as opposed to using a TNS_NAMES Entry.

    I set the Config Files Location to the default location (specified in the QuickStart Guide as ~/oracle/network/admin (tried both ~ and the full path) ) and even uninstalled and reinstalled the Extension to no avail, with both options to connect the error is the same as before (restarts of VSCode in-between each change of course).

    Regarding SQLNET.ORA, here are the contents of my file. Honestly I've never even opened this file:

         #### SOF ####

    # sqlnet.ora Network Configuration File: C:\oracle\product\12.2.0\client_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.

    # This file is actually generated by netca. But if customers choose to 
    # install "Software Only", this file wont exist and without the native 
    # authentication, they will not be able to connect to the database on NT.

    SQLNET.AUTHENTICATION_SERVICES= (ALL)

     

    NAMES.DIRECTORY_PATH= (TNSNAMES, LDAP, EZCONNECT)

    #### EOF ####

  • Christian.Shay -Oracle
    Christian.Shay -Oracle Posts: 1,786 Employee
    edited June 2019 Accepted Answer

    I believe part of the problem may be related to LDAP.  Please make a back up copy of that SQLNET.ORA, then edit it to change:

    SQLNET.AUTHENTICATION_SERVICES= (NONE)

    and then delete the NAMES.DIRECTORY_PATH line. Save the SQLNET.ORA and restart VS Code.

    Try connecting "manually" again.

    trangelier
  • trangelier
    trangelier Member Posts: 8
    edited June 2019

    Sure enough that's it!

    Made the two changes you recommended, restarted VSCode and now it works, even with TNS entries. Hope this helps some Linux user later!

    Thanks again Christian!!

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

    We just released a new version of the extension ( version 19.3.1, released 7/31/19) which among other things includes a Oracle Database Browser tree control.  Please try it out and let us know what you think. If you don't have automatic updated enabled see the quickstart for instructions on how to update:

    https://www.oracle.com/database/technologies/appdev/dotnet/odtvscodequickstart.html

  • 3991233
    3991233 Member Posts: 3
    edited August 2019

    Windows 10. Version July 09. Same System.DirectoryServices.Protocols error:

    Oracle Developer Tools for VS Code: Error connecting to server *****.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.

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

    Hi, in the new 19.3.3 release we support LDAP automatically with no special configuration required by the user. Please try it out and let me know what you think!

Sign In or Register to comment.