Oracle 10g ORA-12154: TNS: cocould not resolve the connect identifier specified problem solved!

Source: Internet
Author: User
Tags ldap

Today, from last week, I finally got rid of my problem! I'm proud of it.
Oracle 10g Database is installed on my computer. After configuring the variables, use PL/SQL to operate everything. after installing Oracle 10g client again, the problem arises, with PL/SQL login repeatedly prompt: ORA-12154: TNS: cocould not resolve the connect identifier specified
For beginners, I repeatedly find the problem in "net manager" in "configuration and porting Tools" under "oracle-oradb10g_home3. consult experts, and do not summon the cause of the problem. I was depressed and decided to solve the problem.
I made a lot of repeated data queries and self-check, and the inspiration came out after work. I suddenly realized that my "environment variable" had been ignored.
After opening it, I found that my current environment variable is set as follows:
Path = E:/oraclient_2; E:/Oracle/oradata/bin; E:/Oracle/bin; E:/program files/Java/jdk1.5.0 _ 04/bin; E: /tomcat5028/bin; % SystemRoot %/system32; % SystemRoot %/system32/WBEM
The problem occurs. I should make it as follows:
Path = E:/Oracle; E:/Oracle/oradata/bin; E:/Oracle/bin; E:/program files/Java/jdk1.5.0 _ 04/bin; E: /tomcat5028/bin; % SystemRoot %/system32; % SystemRoot %/system32/WBEM

OK !!! The problem was solved at the last moment !!! Good.
This is: "Do not abandon do not give up"

 

 

ORA-12154: TNS: cocould not resolve the connect identifier specified

The error also appears in some versions as: "ORA-12154: TNS: cocould not resolve service name ."

When a program needs to connect to an Oracle service via oracle networking (SQL * net), it must look up the connect data for that service somewhere. the Oracle client code raises ORA-12154. most people will encounter this error when their application tries to connect to an Oracle database service, but it can also be raised by one database instance trying to connect to another database service via a database link.

Note that this error is generated by the Oracle client code on the local host where the program is running, not by the remote ORACLE service to which you are attempting to connect.

There are a few ways that the Oracle client code can look up connect data:

  • A flat file named tnsnames. ora
  • Oracle Names Service
  • LDAP

If you see the whole ORA-12154 error with the text, then your program is finding a working Oracle client install, but that the Oracle service as specified is not listed in tnsnames. ora, Oracle names or LDAP. the most common causes of ORA-12154 are:

  • The entry is missing from tnsnames. ora
  • The entry in tnsnames. ora is malformed
  • The program is using tnsnames. ora from the wrong ORACLE_HOME
  • The program is not using a fully-qualified service name, but no default domain is enabled in sqlnet. ora

Most sites use tnsnames. ora, but enough use ORACLE names and LDAP that the first step shoshould be to determine which name resolution method is deployed at your site. if you are not the database administrator, you shocould get in touch with the people who manage your Oracle Systems and find out which method you shocould be using. often they will be able to provide guidance for resolving your problem in accordance with your site's standards.

The client code decides which mechanic to use based on the file sqlnet. ora. this and tnsnames can usually both be found in the Oracle install directory ("ORACLE_HOME"), under Network/admin /. this location may be overridden with the environment variable tns_admin. if the sqlnet. ora file does not exist, or does not specify a resolution method, then Oracle Net uses tnsnames. ora.

Example locations of Oracle networking files:

Windows:

ORANT/NET80/ADMIN/ORACLE/ORA81/NETWORK/ADMIN/ORAWIN95/NETWORK/ADMIN/ORAWIN/NETWORK/ADMIN/

Unix/Linux:

$ORACLE_HOME/network/admin//etc//var/opt/oracle/
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.