0

I'm trying to connect my Visual Studio Code IDE to the test database of my workplace, which is Oracle, through the extension SQLTools by Matheus Teixeira but I get this error:

[1690966489589] INFO  (ls): Connection instance created for TEST_testdb.
   ns: "conn-manager"
[1690966489643] ERROR (ls): Connecting error: {"code":-32001,"data":{"driver":"Oracle","driverOptions":{"oracleOptions":{"autoCommit":false,"lowerCase":false,"thickMode":false}}},"name":"Error"}
   ns: "conn-manager"
[1690966489643] ERROR (ls): Open connection error
   ns: "conn-manager"
[1690966489644] ERROR (ext): ERROR: Error opening connection NJS-516: no configuration directory set or available to search for tnsnames.ora, {"code":-32001,"data":{"driver":"Oracle","driverOptions":{"oracleOptions":{"autoCommit":false,"lowerCase":false,"thickMode":false}}}}
   ns: "error-handler"

This is my connection json:

{
  "oracleOptions": {
    "autoCommit": false,
    "lowerCase": false,
    "thickMode": false
  },
  "previewLimit": 50,
  "askForPassword": true,
  "server": "localhost",
  "port": 1521,
  "driver": "Oracle",
  "connectString": "testdb.bank.it",
  "username": "my-username",
  "name": "TEST_testdb"
}

Other useful info is that I had to install the extension through a proxy as this, and probably there are other things to set before it may work correctly

MT0
  • 143,790
  • 11
  • 59
  • 117
EOTheDev
  • 29
  • 7

1 Answers1

0

Is your database correctly configured? Can you connect to the database via sqlplus? It seems that the tnsnames.ora cannot be found.

matze8426
  • 11
  • 3
  • With this command works C:\Users\conr72>sqlplus my-username/my-pwd@testdb Therefore I changed the string connection on SQLTools from "testdb.bank.it" to "testdb", but the output gives the same error – EOTheDev Aug 02 '23 at 10:01
  • Which version do you use? Oracle XE or the normal database? I will try to replicate it on my machine – matze8426 Aug 02 '23 at 12:17
  • Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production – EOTheDev Aug 03 '23 at 08:57