Oracle11g常用命令-监听
数据库
2018-05-31 15:58:36
阅读次数: 0
1、 查看监听状态
lsnrctl status
C:\Users\admin>lsnrctl status, 未启动的状态
LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-10月-2013 09:2 9:14 Copyright (c) 1991, 2010, Oracle. All rights reserved. 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) TNS-12541: TNS: 无监听程序 TNS-12560: TNS: 协议适配器错误 TNS-00511: 无监听程序 32-bit Windows Error: 2: No such file or directory 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))) TNS-12541: TNS: 无监听程序 TNS-12560: TNS: 协议适配器错误 TNS-00511: 无监听程序 32-bit Windows Error: 61: Unknown error |
2、启动监听
lsnrctl start
C:\Users\admin>lsnrctl start LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-10月-2013 09:32:06 Copyright (c) 1991, 2010, Oracle. All rights reserved. 启动tnslsnr: 请稍候... TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Production 系统参数文件为D:\01win7\oracle11g\product\11.2.0\dbhome_1\network\admin\listener .ora 写入d:\01win7\oracle11g\diag\tnslsnr\chenjda\listener\alert\log.xml的日志信息 监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc))) 监听: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))) 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) LISTENER 的 STATUS ------------------------ 别名 LISTENER 版本 TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ ction 启动日期 22-10月-2013 09:32:11 正常运行时间 0 天 0 小时 0 分 5 秒 跟踪级别 off 安全性 ON: Local OS Authentication SNMP OFF 监听程序参数文件 D:\01win7\oracle11g\product\11.2.0\dbhome_1\network\ad min\listener.ora 监听程序日志文件 d:\01win7\oracle11g\diag\tnslsnr\chenjda\listener\aler t\log.xml 监听端点概要... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))) 服务摘要.. 服务 "CLRExtProc" 包含 1 个实例。 实例 "CLRExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序... 命令执行成功 |
3、查看监听状态
lsnrctl status
C:\Users\admin>lsnrctl status,启动后的状态 LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-10月-2013 09:33:39 Copyright (c) 1991, 2010, Oracle. All rights reserved. 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) LISTENER 的 STATUS ------------------------ 别名 LISTENER 版本 TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 - Produ ction 启动日期 22-10月-2013 09:32:11 正常运行时间 0 天 0 小时 1 分 31 秒 跟踪级别 off 安全性 ON: Local OS Authentication SNMP OFF 监听程序参数文件 D:\01win7\oracle11g\product\11.2.0\dbhome_1\network\ad min\listener.ora 监听程序日志文件 d:\01win7\oracle11g\diag\tnslsnr\chenjda\listener\aler t\log.xml 监听端点概要... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1521ipc))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))) 服务摘要.. 服务 "CLRExtProc" 包含 1 个实例。 实例 "CLRExtProc", 状态 UNKNOWN, 包含此服务的 1 个处理程序... 命令执行成功 |
4、停止监听
lsnrctl stop
C:\Users\admin>lsnrctl stop LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 22-10月-2013 09:34:53 Copyright (c) 1991, 2010, Oracle. All rights reserved. 正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) 命令执行成功 |
5、命令详解
C:\Users\admin>lsnrctl help LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 23-10月-2013 16:01:19 Copyright (c) 1991, 2010, Oracle. All rights reserved. 以下操作可用 星号 (*) 表示修改符或扩展命令: start stop status services version reload save_config trace change_password quit exit set* show* |
转载自xqdd.iteye.com/blog/1962170