Friday, March 8, 2013

ORA-12154: TNS:could not resolve the connect identifier specified

Error while connecting to the remote machine database
ORA-12154: TNS:could not resolve the connect identifier specified

Problem :- service name not correct in connection identifier
                                                     OR
                 Service identifier is not available in "tnsname.ora" file

example -- sqlplus name/password@service_name_identifier

Solution:-- add a "service-name" using "Net Configuration Assistant" by click on option "Local Net service        name configuration"

below is the example of tnsnames.ora file
ORCL* =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = IP_of_system)(PORT = port_number_1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl**)
    )
  )


note*- service name identifier can be same as the service name of database
          **- service name of database
or
check the "service_name_identifier" matches with service name in "tnsname.ora" file

No comments:

Post a Comment

web stats