- 3,715,958 Users
- 2,242,917 Discussions
- 7,845,703 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
Accessing Oracle from VS Code

I'm getting started with the Oracle extension for VS Code. I'm not an Oracle specialist. Up until now I've been using LINQPAD and use a setup like this:
Which is the correct connection type to use in the Oracle extension for VS Code? The closest one I found looks like this:
but that fails with this error:
so I guess I'm doing this wrong. FWIW I'm not sure what the difference is between server name and service name since LINQPAD only has server name
What is the right connection type to use here?
Message was edited by: 2930302b Added linqpad advanced properties config
Best Answer
-
If you are truly using LDAP, then you are unfortunately out of luck as these tools do not currently support LDAP (we hope to in a coming release).
Try searching your whole hard drive for TNSNAMES.ORA in case you have a copy where you don't expect to see if you can get a service name there. Also try contacting your DBA to see if you can connect using a service name rather than LDAP.
Answers
-
(Moving your post to the VS Code forum)
I don't know the first thing about LINQPad but I googled a bit and it appears there is a SERVICE NAME field in the Advanced tab.
Once you have that you can use Basic connection and you have all the info you need to fill in the fields.
If that doesn't work, show me the contents of your Advanced tab.
-
I updated the original post. Hope that helps. Can you help me understand the relationship between servername and service name?
-
Rather than updating the original post, please just reply with info. Otherwise it is hard to follow this thread later for others.
Can you give me the connection string field in the advanced tab? (obfuscated as needed). That is likely where the needed info is.
Server name is the machine name., Service name is the name of Oracle's endpoint, listening for a connection.
-
Here;'s what I have there. Just the server name and userid. no service name
However, the vs code connection config needs a server name *and* a service name or i can't connect.
-
If this helps. my sqlnet.ora has
NAMES.DIRECTORY_PATH= (TNSNAMES,LDAP)
and my ldap.ora has:
DEFAULT_ADMIN_CONTEXT = "dc=bkng,dc=net"
DIRECTORY_SERVERS = (bngoradir.bkng.net:389:636, bngoradir2.bkng.net:389:636, bngoradir3.bkng.net:389:636)
DIRECTORY_SERVER_TYPE = OID
I don;'t have a tsnames.ora file
-
You are correct, that is not enough info.
I suspect that LINQPad is getting the info elsewhere (config file?) but googling has failed me there.
Here is one more thing you can try: Oracle Client has a file called TNSNAMES.ORA that it can use to store for aliases to connections.
Search your whole disk drive for TNSNAMES.ORA and see if you can find one. When you do, look inside as see if you see a connect descriptor that connects to the machine you want. You should be able to find the service name there.
If that does not exist on your machine, the next step is to email your DBA
-
If you are truly using LDAP, then you are unfortunately out of luck as these tools do not currently support LDAP (we hope to in a coming release).
Try searching your whole hard drive for TNSNAMES.ORA in case you have a copy where you don't expect to see if you can get a service name there. Also try contacting your DBA to see if you can connect using a service name rather than LDAP.
-
Yeah I don't have a tsnames.ora. have to wait until you support ldap! Thanks for helping me understand better
-
Edit 12/1/2020:
Hi,
In version 19.3.3 we have a bug that is causing LDAP to continue to not work. For instructions on how to workaround this issue (which will be fixed in the next release), please view this page:
https://www.oracle.com/database/technologies/appdev/dotnet/configure-ldap-windows.html
-
-
Edit 12/1/2020:
Hi,
In version 19.3.3 we have a bug that is causing LDAP to continue to not work. For instructions on how to workaround this issue (which will be fixed in the next release), please view this page:
https://www.oracle.com/database/technologies/appdev/dotnet/configure-ldap-windows.html
-
It works, though the dialog is confusing since it refers to TNS even if you don't have it:
-
Hi,
In version 19.3.3 we have a bug that is causing LDAP to continue to not work. For instructions on how to workaround this issue (which will be fixed in the next release), please view this page:
https://www.oracle.com/database/technologies/appdev/dotnet/configure-ldap-windows.html