Is there a way to configure Oracle SQL Developer to respect the TNS look up order in sqlnet.ora ?
We have all information correctly configured in TNS_ADMIN folder:
ldap.ora
sqlnet.ora
tnsnames.ora
Our sqlnet.ora config TNS Look up order as:
...
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES)
...
We want the client to check LDAP first , then local tnsnames.ora as a backup in case lost LDAP connection.
But looks like Oracle SQL Developer can not use sqlnet.ora.
You either have to select TNS or LDAP explicitly.
I google around , but no one seems bother with this.
Please let me know if it is even possible with Oracle SQL Developer, if so , how ?
For SQLNet.ORA to come into play, setup a THICK connection.
Once you have your HOME established, check 'Use OCI/Thick Driver' below that.
You'll be prompted to restart sqldev.
Then make your connection.
To confirm your connection is 'thick', run this in SQL worksheet with F5:
show connection
What comes back should show :OCI in the connection URL. If you see 'thin', you haven't successfully setup the THICK driver.
Otherwise by default SQL Developer uses JDBC to connect, and SQLNet.ora never comes into play. It can still look for and find a TNSNames.ora file though.
Run this in a worksheet to see what's what with TNS
For people who also have trouble with this.
Someone told me a simple solution.
Related
I have recently downloaded toad for oracle and i want to connect it to my databases but all I have is a cloud wallet for the database.
I have tried to unzip the cloud wallet and point the toad to that location so it can read the tnsnames.ora file but it did not work. I tried editing the current TOAD tns file and adding the host, port, service name and the credentials but it still did not connect. I kept getting a lot of different errors for example connection failed. file could not open
I do not know how to configure TOAD for it to connect.
Can anyone guide me in the process, I researched it a lot but nobody seem to do it often.
Thanks
This is entirely an Oracle Client configuration issue; there is nothing to do in TOAD itself. You need to either unzip the cloud wallet into your ORACLE_HOME/network/admin directory, or unzip it to a custom directory and set the TNS_ADMIN environment variable to point that directory. Note that TNS_ADMIN must be set before you start TOAD.
Here's one reference I found:
https://forums.toadworld.com/t/toad-connection-to-oracle-cloud-autonomous-database-using-wallet/48202
Although I can open my connection using SQL Plus, I am unable to open that connection using Oracle SQL Developer.
Earlier there was no problem. But, a friend of mine wanted to reach my database through another computer. So, he maybe edited some configuration files like:
listener.ora, sqlnet.ora or tnsnames.ora.
But I'm really not sure if this caused the problem.
If the problem is from the previous configuration files then please provide me a link to the files in the default state.
I started to receive this error while I`m using C# with Oracle 10g.
ORA-12560 and I really need to solve it as I`m running out of time on my grad project.
ORA-12560 is a configuration issue. This makes it difficult to diagnose remotely. I have answered a similar question on SO before. my advice is general enough that it should help you too. Find out more.
If it doesn't you'll need to post more details of your listener.ora, tnsnames.ora and perhaps your hosts files.
edit
"All the files are hosted here:"
Hmmmm. Both listener.ora andtnsnames.ora reference HOST = SIKAS-TOSH but server is not included in the hosts file.
edit 2
"the Oracle 10g Express Edition is
installed on my PC"
If your database is on your PC then the files on some web-server are irrelevant. It is the listener.ora andtnsnames.ora on your PC which matter. Those versions of the file need to reference HOST = localhost or else your hosts needs to include SIKAS-TOSH as an alias for 127.0.0.1.
Make sure your listener is running. If it is, try restarting it and re-registering your database with it (through sqlplus as sysdba, type the command alter system register;). Also, make sure that if you run a local firewall you have allowed the port 1521 for incoming traffic (or your custom port if you have changed this).
In Windows the listener is a service, prefixed with the oracle home name + TNSListener.
In Linux, set your oracle home environment and type:
lsnrctl stop
lsnrctl start
I have unintalled and re-installed the oracle 10g many times as well as the ODAC112011beta, last time I didn`t install the ODAC112011beta, instead, I used the Oracle.DataAccess.Client file found in the C:\oraclexe\app\oracle\product\10.2.0\server\BIN\Oracle.DataAccess.dll ... then I started the service from START->All Programs->Oracle Database 10g Express Edition->Start Database as administrator ... now I can connect to the Oracle through C# ... I hope I face no more problems
I'm trying to access an Oracle database on an old server we inherited for a client.
I'm confident I have the Oracle database and listener started and working, but when trying to access sqlplus or the exp commands, I'm getting the following error:
ORA-12162: TNS:net service name is incorrectly specified
I have edited the tnsnames.ora file to change the host to 127.0.0.1 rather than an external URL and I am able to successfully tnsping my connection, but am not getting much further.
Try setting the Oracle SID
set ORACLE_SID=database name
export ORACLE_SID=bvteng worked for me, where bvteng was the service name.
Are you trying a local connection (e.g. "sqlplus u/p") or a network connection (e.g. "sqlplus u/p#pnews10s.world")? Are they both giving you the same error?
The TNSPING by definition is using a network connection. I see some references that indicate you can get the 12612 error when using a local connection. So that is a possible explanation why you are seeing the error from SQLPlus but not TNSPING. If so, try doing a network connection instead.
The local connection not working is probably due to ORACLE_SID not being set correctly as John suggested, but his syntax may not be the right method for whatever shell you are using. Make sure you are using the correct method for the given shell, such as "export ORACLE_SID=name" or "setenv ORACLE_SID name".
I have edited the tnsnames.ora file to change the host to 127.0.0.1 rather
than an external url and am able to successfully tnsping my connection, but am not getting much further.
The last time that happened to me (tnsping works but sqlplus does not, same error message you got), the issue was that someone had copied the tnsnames.ora file from a Windows machine, and left the wrong line feed codes in.
If that is the case, you need to do some dos2unix.
These files are very sensitive to "correct" white-space and tabbing.
Someone should complain to Oracle about that.
Dave Costa has presented you with 2 important question. Are you trying to connect via net8 or locally via extproc? Is the listener on the local machine(127.0.0.1 -- loop back device) setup for extproc connection?
To use the net8 or tcp connection protocol, you need to specify user/pw#tns_alias. To connect locally via extproc you should specify the oracle_sid parameter and then connect via name/pw.
I also notice the tnsalias has the .world domain appended to it, but the sqlnet.ora file does not contain a reference to NAMES.DEFAULT_DOMAIN as being "world".
Also what is the env parameter for TNS_ADMIN? Make sure your tools are looking at the correct tnsnames.ora file. Too many time people modify one tnsnames.ora and the programs/software is looking at another.
Check the tnsnames.ora file, in my case, took me days to find out there were either tab characters in the connection string or other invisible special characters that were causing it to fail.
In my case, the problem was that the DSN and the ServiceName was configured as the same in the odbc.ini file.This should not be a problem, but only after changing the DSN name, I was able to connect to the database through isql.
I am able to connect to an Oracle database using several tools, but am unable to connect using Toad for Oracle 8.5.3 (though before a login/logout to Windows I was able to).
I am not using TNSNAMES.ORA to connect. I have two Oracle homes:
C:\Oracle\product\10.2.0\client_1
(OraClient10g_home1) and
C:\Oracle\product\10.2.0\client_2
(ODACHome2)
where client 2 was installed after client 1.
I have tried Toad with each home, but I get "ORA-12154: TNS:could not resolve the connect identifier specified" when I supply the database name, user name, and password. I can connect using SQL*Plus using this same information, and I can connect via ADO.NET (ODP.NET). tnsping (client 2) to the server works, but tnsping (client 1) does not.
My PATH environment variable contains, in order:
C:\oracle\product\10.2.0\client_2\bin;C:\oracle\product\10.2.0\client_1\bin
and changing the order of PATH seems to have no effect. When I added the line
NAMES.DIRECTORY_PATH= (LDAP, TNSNAMES)
to sqlnet.ora of client 2, Toad still could not connect, but the error message appeared much more quickly.
I found the answer rather quickly after I posted, but I don't know if this is the best solution. I copied the ldap.ora file from client 1 to client 2. ldap.ora had lines like the following, which I have munged for security reasons:
DIRECTORY_SERVERS= (XXXXX:389:636,YYYYY:389:636)
DEFAULT_ADMIN_CONTEXT = ""
DIRECTORY_SERVER_TYPE = OID