問題環境:
1、資料庫版本: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
2、作業系統環境:Windows 7 旗艦版 64位
3、本地安裝有4個Oracle 資料庫軟體【四個資料庫軟體,不是四個資料庫哦】如下:
Oracle 10.2服務端軟體:e:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe
Oracle 11.2服務端軟體:e:\oracle\product\11.2.0\db_1\BIN\sqlplus.exe
Oracle 10.2用戶端軟體:e:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe
Oracle 11.2用戶端軟體:e:\oracle\product\10.2.0\client_1\BIN\sqlplus.exe
問題描述:
1、本地啟動Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 ,服務名sun,服務狀態如下:
C:\Windows\system32>sc query oracleservicesun
SERVICE_NAME:oracleservicesun
TYPE : 10 WIN32_OWN_PROCESS
STATE : 4 RUNNING
(STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0
2、使用Oracle 10.2服務端軟體可以正常串連資料庫,如下:C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>e:\oracle\product\10.2.0\db_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 10.2.0.4.0- Production on 星期一 5月 14 17:06:32 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
串連到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
sys@SUN>
3、使用Oracle 11.2服務端軟體可以正常串連資料庫,如下:C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>e:\oracle\product\11.2.0\db_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 11.2.0.1.0Production on 星期一 5月 14 17:07:23 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
串連到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
sys@SUN>
4、使用Oracle 10.2用戶端軟體可以正常串連資料庫,如下:
C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>E:\oracle\product\10.2.0\client_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 10.2.0.4.0- Production on 星期一 5月 14 17:11:27 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
串連到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
sys@SUN>
5、使用Oracle 11.2用戶端軟體無法串連資料庫,如下
C:\Windows\system32>set ORACLE_SID=sun
C:\Windows\system32>e:\oracle\product\11.2.0\client_1\BIN\sqlplus.exe / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期一 5月 14 17:13:08 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-12560: TNS: 協議適配器錯誤
請輸入使用者名稱:
補充資訊:
Oracle 11.2用戶端sqlnet.ora檔案如下:
# sqlnet.ora Network Configuration File: e:\oracle\product\11.2.0\client_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.
# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
請各位濕濕們不吝賜教,折騰了很久也沒搞明白原因,糾結中。。