TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dbserver/listener1/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1522)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias listener1
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 14-AUG-2019 00:30:27
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1522)))
The listener supports no services
The command completed successfully
[oracle@dbserver admin]$
[oracle@dbserver admin]$ lsnrctl start listener2
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-AUG-2019 00:30:36
Copyright (c) 1991, 2013, Oracle. All rights reserved.
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/dbserver/listener2/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1523)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias listener2
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 14-AUG-2019 00:30:36
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1523)))
The listener supports no services
The command completed successfully
3、配置数据库本地监听注册参数
SQL> alter system set local_listener='L1','L2';
System altered.
SQL> show parameter local
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
local_listener string L1, L2
4、手工注册
SQL> alter system register;
System altered.
5、查看监听状态
[oracle@dbserver admin]$ lsnrctl status listener1
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-AUG-2019 00:46:34
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias listener1
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 14-AUG-2019 00:30:27
Uptime 0 days 0 hr. 16 min. 7 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener1/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1522)))
Services Summary...
Service "prod1" has 1 instance(s).
Instance "prod1", status READY, has 1 handler(s) for this service...
Service "prod1XDB" has 1 instance(s).
Instance "prod1", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@dbserver admin]$
[oracle@dbserver admin]$ lsnrctl status listener2
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 14-AUG-2019 00:46:37
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbserver)(PORT=1523)))
STATUS of the LISTENER
------------------------
Alias listener2
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 14-AUG-2019 00:30:36
Uptime 0 days 0 hr. 16 min. 1 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/dbserver/listener2/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dbserver)(PORT=1523)))
Services Summary...
Service "prod1" has 1 instance(s).
Instance "prod1", status READY, has 1 handler(s) for this service...
Service "prod1XDB" has 1 instance(s).
Instance "prod1", status READY, has 1 handler(s) for this service...
The command completed successfully