查看Oracle数据库监听是否启动应使用lsnrctl命令,命令如下
$ lsnrctl statusConnecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm1.oracle.domain)(PORT=1521)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 – Production
Start Date 17-MAY-2011 21:03:40
Uptime 0 days 0 hr. 2 min. 49 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.1/db/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.1/db/network/log/listener.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=1600)))
Services Summary…
Service “POD” has 1 instance(s).
Instance “POD”, status READY, has 1 handler(s) for this service…
Service “POD1″ has 1 instance(s).
Instance “POD”, status UNKNOWN, has 1 handler(s) for this service…
Service “PODS” has 1 instance(s).
Instance “POD”, status READY, has 2 handler(s) for this service…
Service “pod_XPT” has 1 instance(s).
Instance “POD”, status READY, has 1 handler(s) for this service…
Service “repos” has 2 instance(s).
Instance “repos”, status UNKNOWN, has 1 handler(s) for this service…
Instance “repos”, status READY, has 1 handler(s) for this service…
Service “repos_XPT” has 1 instance(s).
Instance “repos”, status READY, has 1 handler(s) for this service…
The command completed successfully
lsnrctl命令常用参数:
$ lsnrctl status:检查当前监听器的状态$ lsnrctl start [listener-name] 启动所有的监听器,可以指定名字来启动特定的监听器
$ lsnrctl stop [listener-name] 关闭所有的监听器,可以指定名字来关闭特定的监听器
$ lsnrctl reload 重启监听器,此命令可以代替lsnrctl stop,lsnrctl start
$ lsnrctl help 可以显示所有可用的监听器命令
用 oracle:~ # lsof -i:1521 如果有返回信息,就说明侦听是启用的,如果没有返回任何信息说明侦听是停用的,或者你用 lsnrctl start。
oracle@oracle:~>lsnrctl start
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-JUL-2014 18:28:35
Copyright (c) 1991, 2011, Oracle. All rights reserved.
TNS-01106: Listener using listener name LISTENER has already been started
返回以上信息,说明是启用的。
方法1::
看 oracle监听是否启动 在CMD下运行如下命令就可以 lsnrctl status
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=spcc)(PORT=1525)))
TNS-12541: TNS:无监听器
TNS-12560: TNS: 协议适配器错误
TNS-00511: 无监听器
32-bit Windows Error: 61: Unknown error
LSNRCTL>start listener1
启动tnslsnr:请稍候...
这表示没有启动。。
方法2:
如果是LINUX系统可以通过如下命令看进程在不在
ps -ef|grep lsn
看 oracle监听是否启动 在CMD下运行如下命令就可以
lsnrctl status
正在连接到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=spcc)(PORT=1525)))
TNS-12541: TNS:无监听器。TNS-12560: TNS: 协议适配器错误。TNS-00511: 无监听器
32-bit Windows Error: 61: Unknown error
LSNRCTL>start listener1
启动tnslsnr:请稍候...。这表示没有启动。。
如果是LINUX系统可以通过如下命令看进程在不在
ps -ef|grep lsn
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)