ORA-12154 TNS:could not resolve service name

Oracle maintain tnsnames.ora file to recognize databases. A number of database entries can be in this file for connecting different databases.When this problem came, I just check tnsnames.ora file in Network directory of Oracle. That is look like this -


connection service string =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521))
   )
 (CONNECT_DATA =
   (SERVICE_NAME = )
 )
)

  I found server name instead of Server IP in tnsnames.ora. I just remove the server name with Server IP.
It worked.

Comments