Check the tnsnames.ora file are exist in your $ORACLE_HOME/network/admin directory. If it is exist check the service name are correct which you provide in tnsnames.ora file and also make sure that you use same service name in listener.ora file.
[oracle@sbdbdr01 ~]$ tnsping erpcbs
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2016 11:08:10
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
TNS-03505: Failed to resolve name
[oracle@sbdbdr01 ~]$
[oracle@sbdbdr01 ~]$
[oracle@sbdbdr01 ~]$
[oracle@sbdbdr01 ~]$ cd /u01/app/oracle/product/11.2.4/db_1/network/admin/
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$ ls -ltr
total 12
-rw-r--r-- 1 oracle oinstall 381 Dec 17 2012 shrept.lst
drwxr-xr-x 2 oracle oinstall 4096 May 9 19:06 samples
-rw-r--r-- 1 oracle oinstall 369 May 10 17:14 tnsname.ora
[oracle@sbdbdr01 admin]$ rm tnsname.ora
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$ vi tnsnames.ora
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$ tnsping erpcbs
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2016 11:13:05
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = erpdcdb-cluster-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = erpcbs)))
OK (0 msec)
[oracle@sbdbdr01 admin]$ tnsping erpcbsdr
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2016 11:13:22
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = sbdbdr01)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = erpcbsdr)))
OK (0 msec)
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 ~]$ tnsping erpcbs
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2016 11:08:10
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
TNS-03505: Failed to resolve name
[oracle@sbdbdr01 ~]$
[oracle@sbdbdr01 ~]$
[oracle@sbdbdr01 ~]$
[oracle@sbdbdr01 ~]$ cd /u01/app/oracle/product/11.2.4/db_1/network/admin/
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$ ls -ltr
total 12
-rw-r--r-- 1 oracle oinstall 381 Dec 17 2012 shrept.lst
drwxr-xr-x 2 oracle oinstall 4096 May 9 19:06 samples
-rw-r--r-- 1 oracle oinstall 369 May 10 17:14 tnsname.ora
[oracle@sbdbdr01 admin]$ rm tnsname.ora
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$ vi tnsnames.ora
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$ tnsping erpcbs
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2016 11:13:05
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = erpdcdb-cluster-scan)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = erpcbs)))
OK (0 msec)
[oracle@sbdbdr01 admin]$ tnsping erpcbsdr
TNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 11-MAY-2016 11:13:22
Copyright (c) 1997, 2013, Oracle. All rights reserved.
Used parameter files:
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = sbdbdr01)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = erpcbsdr)))
OK (0 msec)
[oracle@sbdbdr01 admin]$
[oracle@sbdbdr01 admin]$
This is great guide on how to fix the most common Oracle networking issues, including TNS-03505: FAILED TO RESOLVE NAME
ReplyDeletehttps://n4stack.io/2018/09/06/how-to-fix-oracle-network-issues/