TNS-03505 name cannot be resolved

Source: Internet
Author: User

TNS-03505 name cannot be resolvedProblem phenomenon:
[[email protected] admin]$ tnsping wootns Ping Utility for linux:version 11.2.0.4.0-production on 15-jun-2015 21:57:52c Opyright (c) 1997, Oracle.  All rights reserved. Used parameter files:tns-03505:failed to resolve Name[[email protected] admin]$ sqlplus system/[email protected]sql*plus : Release 11.2.0.4.0 Production on Mon June 21:58:48 2015Copyright (c) 1982,-Oracle.  All rights reserved. Error:ora-12154:tns:could not resolve the connect identifier Specifiedenter user-name: ^c

Problem Analysis:This problem usually occurs for two reasons: 1, the name does not exist 2, the TNS configuration file does not exist.

Problem processing: 1, first check all the configuration information of Tnsnames.ora, all normal without any problems.
[[email protected] admin]$ cat Tnsname.ora pri =  (DESCRIPTION = (    ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.1.50) (P ORT = 1521))    (Connect_data =      (SERVER = dedicated)      (service_name = Woo)    )  )

2, check the Tnsnames.ora files and files of the user and user group
[[email protected] admin]$ ll tnsnames.ora-rwxr--r--1 Oracle oinstall June 22:04 tnsname.ora# From here is also no problem, the file belongs to Oins The tall user group, and all of its permissions are also Oracle

3, so this time we choose to skip Tnsnames.ora by manual login to verify that the database is normal
[Email protected] admin]$ sqlplus system/[email protected]/woosql*plus:release 11.2.0.4.0 Production on Tue June 16 22:34 : 2015Copyright (c) 1982, Oracle.  All rights reserved. Connected to:oracle Database 11g Enterprise Edition Release 11.2.0.4.0-productionwith The partitioning, Oracle Label Sec Urity, OLAP, Data mining,oracle Database Vault and Real application testing options              sql> select name from V$databas E NAME---------woosql> Select Instance_name,status from v$instance;instance_name    status---------------------- ------Woo              opensql> #从这里我们可以看到, the database is certainly not a problem, then next we will take a good listening file to replace the listener file to deal with the problem.

4. Compare by uploading a previously available listening profile
[Email protected] admin]$ Lslistener.ora  samples  shrept.lst  sqlnet.ora  Tnsname.ora  Tnsnames.ora[[email protected] admin]$ chmod u+x tnsnames.ora [[email protected] admin]$ lltotal 24-rwxr-xr-x 1 Oracle oin Stall  711 June 22:08 listener.oradrwxr-xr-x 2 Oracle oinstall 4096 June one 21:56 samples-rw-r--r--1 Oracle oinstall< c6/>381 Dec  shrept.lst-rw-r--r--1 Oracle oinstall  221 June + 21:59 sqlnet.ora-rwxr--r--1 Oracle Oinstall  June 22:31 tnsname.ora-rwxr--r--1 Oracle oinstall  June 22:04 Tnsnames.ora    ----This is the back upload # By contrast, I The name of the file that was previously handmade is incorrect, even if the contents are correct.

5. The problem is resolved by modifying and replacing the listening file:
[[email protected] admin]$ cat Tnsname.ora > tnsnames.ora[[email protected] admin]$ rm-rf Tnsname.ora [[ Email protected] admin]$ sqlplus system/[email protected]sql*plus:release 11.2.0.4.0 Production on Tue June 16  23:02:15 2015Copyright (c) 1982, Oracle. All rights reserved. Connected to:oracle Database 11g Enterprise Edition Release 11.2.0.4.0-productionwith The partitioning, Oracle Label Sec Urity, 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 shrept.lstdrwxr-x R-x 2 Oracle oinstall 4096 June 21:56 samples-rw-r--r--1 Oracle oinstall 221 June 1 21:59 sqlnet.ora-rwxr-xr-x Oracl E oinstall 711 June 22:08 listener.ora-rwxr--r--1 Oracle oinstall June 23:02 tNsnames.orasql>  


TNS-03505 name cannot be resolved

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.