查看监听状态:
[oracle@ydhl ~]$ ps -ef | grep tns
root 336 2 0 11月24 ? 00:00:00 [netns]
oracle 4978 4540 0 14:17 pts/2 00:00:00 grep --color=auto tns
oracle 28540 1 0 12月04 ? 00:00:01 /u01/app/oracle/product/12.1.0/db_1/bin/tnslsnr LISTENER -inherit
[oracle@ydhl ~]$ lsnrctl status LISTENER
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 05-DEC-2021 14:17:35
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=172.20.3.20)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 04-DEC-2021 14:30:43
Uptime 0 days 23 hr. 46 min. 52 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ydhl/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.20.3.20)(PORT=1521)))
Services Summary...
Service "RZCDB" has 1 instance(s).
Instance "cdb", status READY, has 1 handler(s) for this service...
Service "cdb" has 1 instance(s).
Instance "cdb", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
查看监听文件配置
[oracle@ydhl ~]$ cat /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
LISTENER =
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=172.20.3.20)(PORT=1521))
)
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=cdb)
(SID_NAME=cdb)
(ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1)
)
)