PL/SQL reports ORA-12154: TNS: failed to parse the specified connection flag

Source: Internet
Author: User

I often encountered this problem and found the answer today.
I installed Oracle 10.2 servers first,
After a while, install the Oracle 10.1 client,
The ORA-12154: TNS: failed to parse the specified connection identifier with PL/SQL

 

In Asp.netProgramThe new datasource can be connected. The datasource of the old version cannot be connected.

I copied tnsnames. ora under the Network \ ADMIN directory of the servers installation directory to the network \ ADMIN directory of the Client installation directory. PL/SQL showed all service names and logged on normally.

 
After a while, I installed Oracle warehouse builder, with PL/SQL login and reported ORA-12154: TNS: unable to resolve the specified connection identifier, but sqlplus can be connected normally
I added the tnsnames. ora file under the installation directory Network \ ADMIN of Oracle warehouse builder, and added the service name configuration to be connected. Then the connection can be established normally.
Summary: every time an oracle product is installed, PL/SQL will go back to install tnsnames. ora in the latest installation directory of the product to read files from it.
You can use the following command to check your configuration in DOS
1. Client
Tnsping <tns_name>
2. Server Side
LSNRCTL> Service

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.