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