Oracle 默认和非默认监听(二)

2014-11-24 18:59:48 · 作者: · 浏览: 70
07:35
Uptime 0 days 0 hr. 11 min. 4 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/10201/network/admin/listener.ora
Listener Log File /oracle/product/10201/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oms)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "cuug" has 1 instance(s).
Instance "cuug", status READY, has 1 handler(s) for this service...
Service "cuug_XPT" has 1 instance(s).
Instance "cuug", status READY, has 1 handler(s) for this service...
The command completed successfully
==========================
[oracle@oms admin]$ lsnrctl status listener1


LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-APR-2010 00:18:42


Copyright (c) 1991, 2005, Oracle. All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oms)(PORT=1526)))
STATUS of the LISTENER
------------------------
Alias listener1
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 14-APR-2010 00:06:56
Uptime 0 days 0 hr. 11 min. 45 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/10201/network/admin/listener.ora
Listener Log File /oracle/product/10201/network/log/listener1.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oms)(PORT=1526)))
Services Summary...
Service "guuc" has 1 instance(s).
Instance "cuug", status UNKNOWN, has 1 handler(s) for this servi



五、配置本地的tnsnames.ora文件
LSNR2 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = oms)(PORT = 1526))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = cuug) #此名字可以自定义,一般定义为实例的名字
)
)


六、动态更改local_listener的值:
SQL> alter system set local_listener = lsnr2;


七、注意两个监听的变化,默认的监听没有实例注册,非默认的注册了一个实例:
[oracle@oms admin]$ lsnrctl status listener


LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 14-APR-2010 00:25:50


Copyright (c) 1991, 2005, Oracle. All rights reserved.


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oms)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias listener
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 14-APR-2010 00:07:35
Uptime 0 days 0 hr. 18 min. 14 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oracle/product/10201/network/admin/listener.ora
Listener Log File /oracle/product/10201/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oms)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
====================