I just created a simple TNSNAMES.ORA as follow:
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.12)(PORT = 1521))
(SERVICE_NAME = oracledb)
When I use SQLPLUS username@oracledb, the SQLPlus prompt me the password and the SQLPlus can connect the Oracle successfully.
However, when I just run SQLPLUS, the SQLPlus will return to following error once I entered username and password:
Error while trying to retrieve text for error ORA-12545
In my environmental variable, I already setup up ORACLE_SID=oracledb.
Anyone can solve above case?
Try this format!
(ADDRESS = (PROTOCOL= TCP)(Host= scodb)(Port= 1521))
(CONNECT_DATA = (SID = test))
Check the host ip address. Better to give always host name.
Hi, 15th April 2001 16:33 hrs chennai
1) I am able to connect with this format in my system.
(ADDRESS = (PROTOCOL = TCP)(HOST = padmam)(PORT = 1521))
(SERVICE_NAME = new)
even by providing IP address instead of host name.
2)without using Host file i am able to connect to SQLPLUS by supplying username and pwd.
3)Do you have more than one instance set up at your server ?
I had the same problem too but i was unable to connect as you have said.
With a single DB in Oracle Home dir no problem for me now.
Some more check
I enabled Net8 Trace on the client side. I found that if I use SQLPLUS username/password@testdb, the sqltrace.log show that the TNSNAMES is working properly.
However, If I omit the username/password@testb and run SQLPLUS directly.
I found that Net8 Client will use following method instead.
niotns: Calling address: (DESCRIPTION=(ADDRESS=(PROTOCOL=beq)(PROGRAM=/u01/app/oracle/product/
It seem that it can't find the testdb in the tnsnames.ora and attempt to use local connection.