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.
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"
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
Then save sqlnet.ora and restart Visual Studio Code.
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.