lsnrctl查询到的状态显示如下
LSNRCTL> status
Connecting 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
status详解
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)))
#此处说明该主机地址为ocm1.oracle.domain,开启的监听端口有1521,1522,1600
Services Summary...
Service "POD" has 1 instance(s).
Instance "POD", status READY, has 1 handler(s) for this service...
#此处说明有一个服务名POD的服务,数据库实例名为POD,状态READY说明其目前处于动态注册
Service "POD1" has 1 instance(s).
Instance "POD", status UNKNOWN, has 1 handler(s) for this service...
#此处说明有一个服务名为POD1的服务,数据库的实例名为POD,状态UNKNOWN说明其目前是静态注册
Service "PODS" has 1 instance(s).
Instance "POD", status READY, has 2 handler(s) for this service...
#此处说明有一个服务名为PODS的服务,数据库实例名为POD,状态READY说明其是动态注册
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...
The command completed successfully
#此处说明有一个服务名为repos的服务,对应数据库实例为repos,UNKNOWN,READY状态说明其目前有一个静态注册和一个动态注册
LSNRCTL> services
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm1.oracle.domain)(PORT=1521)))
Services Summary...
Service "POD" has 1 instance(s).
Instance "POD", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "POD1" has 1 instance(s).
Instance "POD", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Service "PODS" has 1 instance(s).
Instance "POD", status READY, has 2 handler(s) for this service...
Handler(s):
"D001" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37290))
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37288))
Service "pod_XPT" has 1 instance(s).
Instance "POD", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "repos" has 2 instance(s).
Instance "repos", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "repos", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
Service "repos_XPT" has 1 instance(s).
Instance "repos", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
The command completed successfully
service详解
Service "POD" has 1 instance(s).
Instance "POD", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
#名为POD的服务,对应数据库实例为POD,状态READY说明其处于动态注册
DEDICATED" established:0 refused:0 state:ready说明是专有连接,连接数为0拒绝数为0,状态:动态
Service "POD1" has 1 instance(s).
Instance "POD", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0
LOCAL SERVER
#名为POD1的服务,对应数据库实例为POD,状态UNKNOWN说明其处于静态注册
DEDICATED" established:2 refused:0说明是专有连接,连接数为2拒绝数为0
Service "PODS" has 1 instance(s).
Instance "POD", status READY, has 2 handler(s) for this service...
Handler(s):
"D001" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37290))
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER
(ADDRESS=(PROTOCOL=tcp)(HOST=ocm1.oracle.domain)(PORT=37288))
#名为PODS的服务,对应数据库实例名为POD的数据库,READY状态说明其为动态注册
"D001" established:0 refused:0 current:0 max:1022 state:ready
"D000" established:0 refused:0 current:0 max:1022 state:ready
这里说明其为share模式,目前,两个dispatcher目前都连接为0,拒绝为0,最大数为1022,状态是动态注册
------------------------------------------------------------------------------------------------------------------------------------------------------------------
对应sql查询
SQL> show parameter dispatchers
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Service "repos" has 2 instance(s).
Instance "repos", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
Instance "repos", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0 state:ready
LOCAL SERVER
#repos服务对应的实例有2个,但此处都为实例repos,一个为静态UNKNOWN,一个为动态READY,目前连接数都为0,拒绝也为0
The command completed successfully