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/tigerSQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:43:55 2007Copyright (c) 1982, 2005, Oracle.  All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsscott%ORA10GR1> exitDisconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsC:\Documents and Settings\tkyte>net stop oracleserviceora10gr1The OracleServiceORA10GR1 service is stopping.........The OracleServiceORA10GR1 service was stopped successfully.C:\Documents and Settings\tkyte>sqlplus scott/tigerSQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:44:35 2007Copyright (c) 1982, 2005, Oracle.  All rights reserved.ERROR:ORA-12560: TNS:protocol adapter errorEnter user-name:ERROR:ORA-12560: TNS:protocol adapter errorEnter user-name:ERROR:ORA-12560: TNS:protocol adapter errorSP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*PlusC:\Documents and Settings\tkyte>net start oracleserviceora10gr1The OracleServiceORA10GR1 service is starting..........The OracleServiceORA10GR1 service was started successfully.C:\Documents and Settings\tkyte>sqlplus scott/tigerSQL*Plus: Release 10.1.0.4.0 - Production on Thu Sep 6 15:45:12 2007Copyright (c) 1982, 2005, Oracle.  All rights reserved.Connected to:Oracle Database 10g Enterprise Edition Release 10.1.0.4.0 - ProductionWith the Partitioning, OLAP and Data Mining optionsscott%ORA10GR1>
修改方法:控制面板>管理工具>服務裡邊把OracleServiceSID起起來