1. 程式人生 > >ORA-12560: TNS:protocol adapter error(TNS:協議介面卡錯誤)

ORA-12560: TNS:protocol adapter error(TNS:協議介面卡錯誤)

下邊是Tom的一個Test Case來說明OracleServiceSID服務沒有起來的話,是會引起ORA-12560錯誤的。
C:\Documents and Settings\tkyte>sqlplus scott/tiger

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:43:55 2007

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options

scott%ORA10GR1> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options

C:\Documents and Settings\tkyte>net stop oracleserviceora10gr1
The OracleServiceORA10GR1 service is stopping.........
The OracleServiceORA10GR1 service was stopped successfully.


C:\Documents and Settings\tkyte>sqlplus scott/tiger

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:44:35 2007

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

ERROR:
ORA-12560: TNS:protocol adapter error


Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error


Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

C:\Documents and Settings\tkyte>net start oracleserviceora10gr1
The OracleServiceORA10GR1 service is starting..........
The OracleServiceORA10GR1 service was started successfully.


C:\Documents and Settings\tkyte>sqlplus scott/tiger

SQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:45:12 2007

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - Production
With the Partitioning, OLAP and Data Mining options

scott%ORA10GR1>
修改方法:控制面板>管理工具>服務裡邊把OracleServiceSID起起來