- 3,715,952 Users
- 2,242,917 Discussions
- 7,845,700 Comments
Forum Stats
Discussions
Categories
- 17 Data
- 362.2K Big Data Appliance
- 7 Data Science
- 1.6K Databases
- 475 General Database Discussions
- 3.7K Java and JavaScript in the Database
- 22 Multilingual Engine
- 487 MySQL Community Space
- 5 NoSQL Database
- 7.6K Oracle Database Express Edition (XE)
- 2.8K ORDS, SODA & JSON in the Database
- 417 SQLcl
- 42 SQL Developer Data Modeler
- 184.9K SQL & PL/SQL
- 21K SQL Developer
- 1.9K Development
- 3 Developer Projects
- 32 Programming Languages
- 135.1K Development Tools
- 9 DevOps
- 3K QA/Testing
- 256 Java
- 6 Java Learning Subscription
- 10 Database Connectivity
- 67 Java Community Process
- 1 Java 25
- 9 Java APIs
- 141.1K Java Development Tools
- 6 Java EE (Java Enterprise Edition)
- 153K Java Essentials
- 135 Java 8 Questions
- 86.2K Java Programming
- 270 Java Lambda MOOC
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 10 Java SE
- 13.8K Java Security
- 3 Java User Groups
- 22 JavaScript - Nashorn
- 18 Programs
- 125 LiveLabs
- 30 Workshops
- 9 Software
- 3 Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 3 Deutsche Oracle Community
- 11 Español
- 1.9K Japanese
- 2 Portuguese
VSCode Oracle Developer Tools - Fedora 30

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!
Best 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.
Answers
-
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.
-
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.
-
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?
-
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.
-
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?
-
"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 #### -
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.
-
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!!
-
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
-
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.
-
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!