1、检查监听器状态: 输入 lsnrctl status
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 11-7月 -2010 10:5
0:33
Copyright (c) 1991, 2005, Oracle. All rights reserved.
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.187)(PORT=1521)))
TNS-12541: TNS: 无监听程序
TNS-12560: TNS: 协议适配器错误
TNS-00511: 无监听程序
32-bit Windows Error: 61: Unknown error
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-12541: TNS: 无监听程序
TNS-12560: TNS: 协议适配器错误
TNS-00511: 无监听程序
32-bit Windows Error: 2: No such file or directory
2、尝试登陆本地数据库:
输入 sqlplus /nolog
SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 7月
Copyright (c) 1982, 2005, Oracle. All rights reserved. 输入 conn system/qqqqqq@oradb as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 7月
Copyright (c) 1982, 2005, Oracle. All rights reserved.
原因:监听器没有启动,无法解析“oradb”服务名,所以无法登陆数据库。
输入 exit
3、启动监听器 输入 lsnrctl start
LSNRCTL for 32-bit Windows: Version 10.2.0.1.0 - Production on 11-7月 -2010 10:5
2:30
Copyright (c) 1991, 2005, Oracle. All rights reserved.
启动tnslsnr: 请稍候...
TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Production
系统参数文件为e:\oracle\product\10.2.0\db_1\network\admin\listener.ora
写入e:\oracle\product\10.2.0\db_1\network\log\listener.log的日志信息
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.187)(PORT=1521)))
监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.187)(PORT=1521)))
LISTENER 的 STATUS
------------------------
别名 LISTENER
版本 TNSLSNR for 32-bit Windows: Version 10.2.0.1.0 - Produ
ction
启动日期 11-7月 -2010 10:52:32
正常运行时间 0 天 0 小时 0 分 1 秒
跟踪级别 off
安全性 ON: Local OS Authentication
SNMP OFF
监听程序参数文件 e:\oracle\product\10.2.0\db_1\network\admin\listener.o
ra
监听程序日志文件 e:\oracle\product\10.2.0\db_1\network\log\listener.log
监听端点概要...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.187)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC0ipc)))
服务摘要..
服务 "PLSExtProc" 包含 1 个例程。
例程 "PLSExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序...
命令执行成功
输入 sqlplus /nolog SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 7月
Copyright (c) 1982, 2005, Oracle. All rights reserved. 输入 conn system/qqqqqq@oradb as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期日 7月 11 10:53:59 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务