windows 上安裝與資料庫不同版本的客戶端引起的ora 12557

wengtf發表於2012-10-08

ORA-12557: TNS:protocol adapter not loadable
Cause: On some platforms (such as OS/2) protocol adapters are loaded at run-time. If the shared library (or DLL) for the protocol adapter is missing or one of its supporting libraries is missing then this error is returned.
Action: For further details, turn on tracing and reexecute the operation. The trace file will include the name of the shared library (or DLL) that could not be loaded.

1. Make sure the %ORACLE_HOME%/bin directory is in your PATH.
2. Make sure the protocol is typed/specified correctly in your
tnsnames.ora file or whatever source you're using to resolve service
names.
3. TCP is the default protocol and is installed by default. If
you're using something different (like SPX) make sure you installed the
protocol adapter.
4. Make sure TOAD is using the correct oracle home if you have
multiple homes installed

上面其實告訴你這問題跟環境變數有關,僅此而已。具體情況具體分析:

環境:

    oracle 10.2.0.4 rac for windows 2003 sp2

 

問題現象:

     開發人員在資料庫伺服器上裝了第2oracle 10.2.0.1的客戶端軟體(事後才知道),dba在未知的情況下命令列敲sqlplus 出現10.2.0.1,在連結資料庫的時候出現標題中錯誤;

 

問題分析:

    oracle 10201客戶端在資料庫升級後安裝,導致環境變數中所記錄的環境變數 客戶端在資料庫軟體本身之前,dba在命令列進去後不管如何設定(set ORACLE_SIDORACLE_HOME)其實都是對的,但是惘然;

 

問題解決:

    將資料庫軟體的環境變數提前(在我的電腦--屬性--高階--環境變數--path)即解決問題;

 

這個問題對我這種想玩技術的屌絲是玩不轉的,腦子沒轉到有人在“吭你”,溝通千百回才知道是這個情況,長記性吧,切記切記。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22907091/viewspace-745920/,如需轉載,請註明出處,否則將追究法律責任。

相關文章