TNSPING OK but sqlplus gives ORA-12154?

好久不见. 提交于 2019-11-29 03:41:16
DCookie

Create an environment variable TNS_ADMIN that points to the directory where your tnsnames.ora file resides. Then try to connect with sqlplus.

If that works, then my guess is you maybe installed the Oracle client software too, and when you run sqlplus, it looks for the tnsnames.ora file in your client home.

-- Instructions for Adding the Environment variable TNS_ADMIN in windows
1. Go to control panel / system
2. select Advanced system settings
3. Select "Advanced" tab, and the environment variable button is at the bottom.
4. create new variable TNS_ADMIN and give the path where the .ora files are stored. e.g. C:\app\oracle\product\11.2.0\client_1\network\admin

Sqlplus will give this error if you have an at-sign (@) in your password, which you do. Sqlplus thinks you are inputting the connection string as a parameter. Change your password (you can do this with SQL Developer).

Moral: Don't use at-signs in Oracle passwords.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!