IT_Expert/DataBase
|
2009. 7. 17. 11:05
Thread: ORA-12154: TNS:could not resolve the connect identifier specified
오라클 포럼에서 해당되는 답을 찾을 수 있다.
http://forums.oracle.com/forums/thread.jspa?threadID=267600&start=45&tstart=0
답글 중에 한명의 내용을 copy하자면...
----------------------------------------------------
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.
----------------------------------------------------
저 같은 경우에는 XP에서 세팅을 하여 해결을 보았습니다.
내컴퓨터-속성-고급탭-환경변수 버튼-시스템변수 그룹에
ORACLE_HOME 이라는 환경변수가 있는지 확인 한 후
없으면 "새로만들기" 를 통해서
ORACLE_HOME
오라클 클라이언트의 경로(c:\oracle\product\10.2.0\client_1) 을 입력 후 재시도하여 본다.
만약 그래도 안되면 재부팅을 하면 됨.
http://forums.oracle.com/forums/thread.jspa?threadID=267600&start=45&tstart=0
답글 중에 한명의 내용을 copy하자면...
----------------------------------------------------
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.
----------------------------------------------------
저 같은 경우에는 XP에서 세팅을 하여 해결을 보았습니다.
내컴퓨터-속성-고급탭-환경변수 버튼-시스템변수 그룹에
ORACLE_HOME 이라는 환경변수가 있는지 확인 한 후
없으면 "새로만들기" 를 통해서
ORACLE_HOME
오라클 클라이언트의 경로(c:\oracle\product\10.2.0\client_1) 을 입력 후 재시도하여 본다.
만약 그래도 안되면 재부팅을 하면 됨.