Oracle11g常用命令-监听

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*


 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

码农丁丁

你的认可是我创作最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值