Environment:
Win10, oracle10.2.1, Plsql 7.4
question:
After Oracle is installed, using Plsql to connect to the database, it is always reported that "ora-12154 cannot resolve the specified connection identifier" error.
Solve:
1, download the Oracle client required files, unzip it in a folder, download the address:
Www.oracle.com/technetwork/topics/winsoft-085727.html
2. Copy the extracted file folder to a directory, for example: H:\instantclient_10_2
3, copy the Oracle Tnsnames.ora,listener.ora files to the H:\instantclient_10_2 directory, copy the file reference location:
K:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
Note that the two files are configured correctly.
4, set the operating system environment variables
Oracle_home=h:\instantclient_10_2 (the directory where the Oracle client files reside)
Nls_lang=simplified Chinese_china. ZHS16GBK (This step solves the problem that Chinese characters can't display correctly after Plsql query, that is, solve character set problem)
5, in the Plsql "tool"-> "preferences"-> connection, set the Oracle home directory and OCI library path, the values are set to:
H:\instantclient_10_2
H:\instantclient_10_2\oci.dll
Turn off the Plsql, reboot, and discover that the database is connected properly.
Note:
Plsql may require administrator privileges to start, or there will be a blank message prompt and no connection.