ORA-12560: TNS: 協議適配器錯誤

來源:互聯網
上載者:User

Sqlplus 登陸oracle時報錯ORA-12560:TNS: 協議適配器錯誤



如下:C:\Users\Administrator>setORACLE_SID=DDBC


C:\Users\Administrator>SQLPLUS/ AS SYSDBA


SQL*Plus:Release 11.2.0.1.0 Production on 星期一 9月 9 16:41:392013


Copyright (c)1982, 2010, Oracle.  All rights reserved.


ERROR:

ORA-12560:TNS: 協議適配器錯誤



請輸入使用者名稱:


先查看下oracle官方對12560的解釋:


ORA-12560:TNS:protocol adapter error

Cause: A generic protocol adapter error occurred.

Action: Check addresses used for proper protocolspecification. Before reporting this error, look at the error stack and checkfor lower level transport errors. For further details, turn on tracing andreexecute the operation. Turn off tracing when the operation is complete.


那麼在看看當前的資料庫,因為資料庫伺服器上同時裝有oracle client端,所以,setORACLE_SID=sid時候,應該是到了client端的目錄中,那麼可以確認下,直接到server端的目錄中查看:


C:\Users\Administrator>cdC:\app\Administrator\product\11.2.0\dbhome_1\BIN


C:\app\Administrator\product\11.2.0\dbhome_1\BIN>setORACLE_SID=DDBC


C:\app\Administrator\product\11.2.0\dbhome_1\BIN>sqlplus/ as sysdba


SQL*Plus:Release 11.2.0.1.0 Production on 星期一 9月 9 16:47:002013


Copyright (c)1982, 2010, Oracle.  All rights reserved.



串連到:

OracleDatabase 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With thePartitioning, OLAP, Data Mining and Real Application Testing options


SQL> selectstatus from v$instance;


STATUS

------------

OPEN


SQL>

這就說明,這是在sqlplus登陸時用的是client端登陸的,可是在環境變數administrator中設定server端的變數,但是還是不行,結果查看環境變數SET:

Path=E:\app\Administrator\product\11.2.0\client_1\bin;C:\app\Administrator\product\11.2.0\dbhome_1\bin;………………

原來是因為在系統中設定了path,其優先順序高,所以才會出現這種現象,修改後就可以了。


另外要說的是在網上搜尋ORA-1256090%的都是那4步,但是99%沒有解決問題。所以在針對問題上,還要細心的思考,才能找到解決問題的思路。


本文出自 “蟲子” 部落格,請務必保留此出處http://worms.blog.51cto.com/969144/1293265

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.