TNS-03505 name cannot be resolved, tns-03505 name resolved

Source: Internet
Author: User

TNS-03505 name cannot be resolved, tns-03505 name resolved

TNS-03505 name can not resolve the problem Phenomenon:
[oracle@db01 admin]$ tnsping priTNS Ping Utility for Linux: Version 11.2.0.4.0 - Production on 15-JUN-2015 21:57:52Copyright (c) 1997, 2013, Oracle.  All rights reserved.Used parameter files:TNS-03505: Failed to resolve name[oracle@db01 admin]$ sqlplus system/oracle@priSQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 15 21:58:48 2015Copyright (c) 1982, 2013, Oracle.  All rights reserved.ERROR:ORA-12154: TNS:could not resolve the connect identifier specifiedEnter user-name: ^C

Problem Analysis: there are usually two reasons for this problem: 1. the name does not exist. 2. The tns configuration file does not exist.

Troubleshooting: 1. First, check all the configuration information of tnsnames. ora. Everything is normal and there is no problem.
[oracle@db01 admin]$ cat tnsname.ora pri =  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.50)(PORT = 1521))    (CONNECT_DATA =      (SERVER = DEDICATED)      (SERVICE_NAME = woo)    )  )

2. Check the users and user groups of tnsnames. ora files and files
[Oracle @ db01 admin] $ ll tnsnames. ora-rwxr -- r -- 1 oracle oinstall 350 Jun 16 tnsname. ora # from here, there is no problem. The file belongs to the oinstall user group, and all its permissions are also Oracle

3. At this time, we chose to skip tnsnames. ora and manually log in to verify that the database is normal.
[Oracle @ db01 admin] $ sqlplus system/oracle@192.168.1.50/wooSQL * Plus: Release 11.2.0.4.0 Production on Tue Jun 16 22:34:40 2015 Copyright (c) 1982,201 3, Oracle. all rights reserved. connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0-ProductionWith the Partitioning, Oracle Label Security, OLAP, Data Mining, Oracle Database Vault and Real Application Testing options SQL> select nam E from v $ database; NAME---------WOOSQL> select instance_name, status from v $ instance; INSTANCE_NAME STATUS -------------- ------------ woo OPENSQL> -- from here we can see that the database is certainly no problem, in the next step, we will replace the listening file with a good listening file to solve the problem.

4. upload an available Listener Configuration File for comparison.
[Oracle @ db01 admin] $ lslistener. ora samples shrept. lst sqlnet. ora tnsname. ora tnsnames. ora [oracle @ db01 admin] $ chmod u + x tnsnames. ora [oracle @ db01 admin] $ lltotal 24-rwxr-xr-x 1 oracle oinstall 711 Jun 16 listener. oradrwxr-xr-x 2 oracle oinstall 4096 Jun 11 samples-rw-r -- 1 oracle oinstall 381 Dec 17 2012 shrept. lst-rw-r -- 1 oracle oinstall 221 Jun 16 sqlnet. ora-rwxr -- r -- 1 Oracle oinstall 350 Jun 16 tnsname. ora-rwxr -- r -- 1 oracle oinstall 350 Jun 16 tnsnames. ora # This is uploaded later # By comparison, I found that the name of the previously manually uploaded file is incorrect, even if the content is correct, it will not help.

5. Solve the problem by modifying and replacing the listening file:
[oracle@db01 admin]$ cat tnsname.ora > tnsnames.ora[oracle@db01 admin]$ rm -rf tnsname.ora [oracle@db01 admin]$ sqlplus system/oracle@priSQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 16 23:02:15 2015Copyright (c) 1982, 2013, Oracle.  All rights reserved.Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - ProductionWith the Partitioning, Oracle Label Security, OLAP, Data Mining,Oracle Database Vault and Real Application Testing optionsSQL> select name from v$database;NAME---------WOOSQL> select instance_name,status from v$instance;INSTANCE_NAME    STATUS---------------- ------------woo              OPENSQL> SQL> host ls -rtltotal 20-rw-r--r-- 1 oracle oinstall  381 Dec 17  2012 shrept.lstdrwxr-xr-x 2 oracle oinstall 4096 Jun 11 21:56 samples-rw-r--r-- 1 oracle oinstall  221 Jun 16 21:59 sqlnet.ora-rwxr-xr-x 1 oracle oinstall  711 Jun 16 22:08 listener.ora-rwxr--r-- 1 oracle oinstall  350 Jun 16 23:02 tnsnames.oraSQL> 


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.