oracle 监听动态和静态的配置

时间:2021-07-27 15:43:05
[oracle@oracledb1 admin]$ vi listener.ora

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (PROGRAM = extproc)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracledb1)(PORT = 1521))
    )
  )

SID_LIST_LISTENER2 =
  (SID_LIST =
    (SID_DESC =
     (GLOBAL_DBNAME = ORADB1)
      (SID_NAME = ORADB1)
    )
  )

LISTENER2 =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracledb1)(PORT = 1522))
    )
  )
ADR_BASE_LISTENER = /u01/app/oracle

[oracle@oracledb1 admin]$ lsnrctl status listener
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-SEP-2013 07:47:37
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracledb1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     listener
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                16-SEP-2013 07:40:13
Uptime                    0 days 0 hr. 7 min. 24 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracledb1/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracledb1)(PORT=1521)))
Services Summary...
Service "ORADB1" has 1 instance(s).
  Instance "ORADB1", status READY, has 1 handler(s) for this service...
Service "ORADB1XDB" has 1 instance(s).
  Instance "ORADB1", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@oracledb1 admin]$ lsnrctl status listener2
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 16-SEP-2013 07:47:51
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracledb1)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     listener2
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                16-SEP-2013 07:30:55
Uptime                    0 days 0 hr. 16 min. 56 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracledb1/listener2/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracledb1)(PORT=1522)))
Services Summary...
Service "ORADB1" has 1 instance(s).
  Instance "ORADB1", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully