"Turn from: http://blog.csdn.net/meng090914/article/details/4720240"
ORA-12154: tns:could not resolve the connect identifier specified, the specified connection cannot be resolved identifier. This indicates a lack of an environmental variable ,tns_admin.
Problem encountered: My oracle10g database is installed on my Linux virtual machine, I usually use the full connection string to connect in the native connection,
When using Userid/[email protected] connection error:ORA-12154: tns:could not resolve the connect identifier Specified
Workaround: Right-click the user variable---Properties--advanced-environment variable -- The variable name is: Tns_admin
the value of the variable is:%oracle_home%/network/admin/ where%oracle_home% is the Orcale installation path,
In fact, the value of this environment variable is set to the path where the Tnsnames.ora file is located, set < Span style= "font-family: the song Body;" >tns_admin change < Span style= "font-family: the song Body;" > in order to be able to find tnsnames.ora. If oracle is installed on this machine, and oracle_home Environment Change , the Tnsnames.ora file is automatically found in the%oracle_home%/network/admin/location .
Using Plsql cannot connect to the database using only Userid/[email protected] . Environment variables need to be set