檢查監聽狀態:
C:\Documents and Settings\Administrator>lsnrctl status
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 15-11月-2012 11:3
0:32
Copyright (c) 1991, 2010, Oracle. All rights reserved.
正在連接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=20121114-1728)(PORT=1521)))
LISTENER 的 STATUS
------------------------
別名 LISTENER
版本 TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ
ction
啟動日期 14-11月-2012 20:40:20
正常運行時間 0 天 14 小時 50 分 13 秒
跟蹤級別 off
安全性 ON: Local OS Authentication
SNMP OFF
監聽程序參數文件 E:\app\Administrator\product\11.2.0\dbhome_1\network\a
dmin\listener.ora
監聽程序日志文件 e:\app\administrator\diag\tnslsnr\20121114-1728\listen
er\alert\log.xml
監聽端點概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=20121114-1728)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc)))
服務摘要..
服務 "CLRExtProc" 包含 1 個實例。
實例 "CLRExtProc", 狀態 UNKNOWN, 包含此服務的 1 個處理程序...
服務 "orcl" 包含 1 個實例。
實例 "orcl", 狀態 READY, 包含此服務的 1 個處理程序...
服務 "orclXDB" 包含 1 個實例。
實例 "orcl", 狀態 READY, 包含此服務的 1 個處理程序...
命令執行成功
C:\Documents and Settings\Administrator>tnsping orcl
TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 15-11月-
2012 11:39:43
Copyright (c) 1997, 2010, Oracle. All rights reserved.
已使用的參數文件:
E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
已使用 TNSNAMES 適配器來解析別名
嘗試連接 (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 20121114-1728)(PORT =
1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
OK (120 毫秒)
看起來,好像都是正常的。
檢查監聽文件:
# listener.ora Network Configuration File: E:\app\Administrator\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 20121114-1728)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
ADR_BASE_LISTENER = E:\app\Administrator
在SID監聽里面加上:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = CLRExtProc)
(ORACLE_HOME = E:\app\Administrator\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS = "EXTPROC_DLLS=ONLY:E:\app\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
)
(SID_DESC =
(GLOBAL_DBNAME = ORCL)
(ORACLE_HOME =E:\app\Administrator\product\11.2.0\dbhome_1)
(SID_NAME = ORCL)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 20121114-1728)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
--ps:加上標黑段落。