Site icon IT Tutorial

TNS-03505: Failed to resolve name

Hi,

Sometimes You can get “TNS-03505: Failed to resolve name ” error.

 

Details of error are as follows.

TNS-03505: Failed to resolve name

Cause: The service name you provided could not be found in TNSNAMES.ORA, an Oracle Names server, or a native naming service.

Action: Verify that you entered the service name correctly. You may need to ensure that the name was entered correctly into the network configuration.


[oracle@msdbadm01 ~]$ tnsping MSDB

TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 03-MAY-2020 16:46:20

Copyright (c) 1997, 2014, Oracle. All rights reserved.

Used parameter files:

/u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora

TNS-03505: Failed to resolve name

[oracle@msdbadm01 ~]$

 


To solve this error, check  the tnsnames.ora has the correct hostname and port and also is there a listener listening on the specified host and port.

 

[oracle@msdbadm01 ~]$ tnsping MSDB

TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 03-MAY-2020 16:46:20

Copyright (c) 1997, 2014, Oracle. All rights reserved.

Used parameter files:
/u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora

TNS-03505: Failed to resolve name
[oracle@msdbadm01 ~]$

 

After fixing the  hostname and port in the tnsnames.ora, it will work fine as follows.

[oracle@msdbadm01 ~]$ tnsping MSDB

TNS Ping Utility for Linux: Version 12.1.0.2.0 - Production on 03-MAY-2020 16:46:22

Copyright (c) 1997, 2014, Oracle. All rights reserved.

Used parameter files:
/u01/app/oracle/product/12.1.0.2/dbhome_1/network/admin/sqlnet.ora


Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.63.34)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = MSDB)))
OK (0 msec)
[oracle@msdbadm01 ~]$

 

 

Do you want to learn more details about RMAN, then read the following articles.

https://ittutorial.org/rman-backup-restore-and-recovery-tutorials-for-beginners-in-the-oracle-database/

 

Exit mobile version