配置静态监听器:
只需要配置listener.ora文件
[oracle@begin001 admin]$ cat listener.ora
listener.ora Network Configuration File: /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora
Generated by Oracle configuration tools.
LISTENER1 =
(DESCRIPTION_LIST =
(ADDRESS_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = begin001)(PORT = 1533))
)
)
)
SID_LIST_LISTENER1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = ortest123)
(SID_NAME = ortest)
(ORACLE_HOME = /u01/app/oracle/product/12.2.0/db_1)
)
)
还原local_listener:
SQL> alter system set local_listener=’’ scope=both;
启动:
lsnrctl start listener1
状态如下,服务名可以随便起,状态为 UNKNOWN:
[oracle@begin001 admin]$ lsnrctl status listener1
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 15-AUG-2021 20:42:21
Copyright © 1991, 2016, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=begin001)(PORT=1533)))
STATUS of the LISTENER
Alias listener1
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 15-AUG-2021 20:41:42
Uptime 0 days 0 hr. 0 min. 39 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/begin001/listener1/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=begin001)(PORT=1533)))
Services Summary…
Service “ortest123” has 1 instance(s).
Instance “ortest”, status UNKNOWN, has 1 handler(s) for this service…
The command completed successfully
[oracle@begin001 admin]$




