sqlplus error ORA-12154: TNS:could not resolve the connect identifier specified [message #444874] |
Wed, 24 February 2010 10:43 |
sandrino82
Messages: 6 Registered: February 2010
|
Junior Member |
|
|
Hi everyone, i'm having some trouble trying to connect the db via sqlplus.
it seems to me that the file tnsnames.ora is not read when i execute sqlplus.
whit the command: sqlplus username/password@servicename i receive the error ORA-12154, while if i pass the whole connection string i can connect without problems
sqlplus username/password@(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = oradev10)(PORT = 10520))(CONNECT_DATA = (SERVICE_NAME = D10)))
i set the ORACLE_HOME environment variable correctly... what more i have to do?
following is my tnsnames.ora
TOTEMPROD =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ttf19.cern.ch)(PORT = 1521))
)
(CONNECT_DATA =
(SID = totemdb)
)
)
TOTEM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oradev10.cern.ch)(PORT = 10520))
)
(CONNECT_DATA =
(SERVICE_NAME = D10)
)
)
my SQLNET.ora is:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH= (HOSTNAME,TNSNAMES,ONAMES)
any help will be very appreciated
Regards
|
|
|
|
|
|
|
Re: sqlplus error ORA-12154: TNS:could not resolve the connect identifier specified [message #444880 is a reply to message #444879] |
Wed, 24 February 2010 11:21 |
sandrino82
Messages: 6 Registered: February 2010
|
Junior Member |
|
|
Ok, i found i am not using the folder specified in the variable ORACLE_HOME;
with tnsping i found sqlplus is using a different folder to look for tnsnames.ora and sqlnet.ora (it's like i have two oracle home...) if i use the service name specified in the other tnsnames.ora file, i can connect without problems... my question now is: how can i change the path sqlplus use to look for tnsnames.ora?
|
|
|
|