Oracle - ORA-12154: TNS:could not resolve the connect identifier specified
ETC./Miscellaneous / 2008. 6. 5. 17:24
I had this same error over and over. I am not a dba but I have loaded oracle 7, 8 and 9 many times, always with the default orcl instance, and always it worked fine. Now with 10.2.0, I find I am in the same situation as others here. The thing I finally found was that if I did a sqlplus fred/fred@orcl from dos command line in the actual network\admin directory, then it worked, but anywhere else, it did not. I assume it therefore cannot fine the tnsnames.ora file if not in this directory. So..... I tried adding the TNS_ADMIN to the registry as per posts but it still did not work after a restart (to re-read the registry ?)
When I loaded the client, I changed the name of oracle home to Oracle_Home from the default specific one. No other changes were performed. I decided to uninstall the client software completely, then re-install it with just the defaults, then re-created the tnsnames.ora using the net config gui tool. I rebooted, tested and same issue as above - sqlplus only works from the network\admin directory.
I set the system environment variable for OraClient10g_home2 to c:\oracle\product\10.2.0\client_2 and restarted - still only worked from the network\admin directory.
I then added a system environemnt variable for ORACLE_HOME to the same loacation and now it all works fine.
In summary - why did the client not add this variable if it saves all this headache ?
Vaise.
출처 - 오라클 포럼
When I loaded the client, I changed the name of oracle home to Oracle_Home from the default specific one. No other changes were performed. I decided to uninstall the client software completely, then re-install it with just the defaults, then re-created the tnsnames.ora using the net config gui tool. I rebooted, tested and same issue as above - sqlplus only works from the network\admin directory.
I set the system environment variable for OraClient10g_home2 to c:\oracle\product\10.2.0\client_2 and restarted - still only worked from the network\admin directory.
I then added a system environemnt variable for ORACLE_HOME to the same loacation and now it all works fine.
In summary - why did the client not add this variable if it saves all this headache ?
Vaise.
출처 - 오라클 포럼