The Listener Control utility enables you to administer listeners. To perform basic management functions on one or more listeners, you can use the Listener Control utility commands. You can also view and change parameter settings.
The basic syntax of Listener Control utility commands is as follows:
1
lsnrctl command listener_name
In the preceding command, listener_name is the name of the listener that you want to administer. If you do not specify a specific listener in the command string, then the command is directed to the default listener name, LISTENER.
LSNRCTL for Linux: Version 19.0.0.0.0- Production on08-NOV-202406:50:30
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=liups)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0- Production StartDate08-NOV-202406:10:36 Uptime 0 days 0 hr. 39 min. 54 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /data/app/oracle/product/19.3.0.0/dbhome_1/network/admin/listener.ora Listener Log File /data/app/oracle/diag/tnslsnr/liups/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=liups)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "ora19cl" has 1 instance(s). Instance "ora19cl", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
LSNRCTL for Linux: Version 19.0.0.0.0- Production on08-NOV-202407:05:12
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=tcp)(HOST=10.0.24.4)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0- Production StartDate08-NOV-202406:10:36 Uptime 0 days 0 hr. 54 min. 36 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /data/app/oracle/product/19.3.0.0/dbhome_1/network/admin/listener.ora Listener Log File /data/app/oracle/diag/tnslsnr/liups/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=liups)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Services Summary... Service "ora19cl" has 1 instance(s). Instance "ora19cl", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
我在后面再加上监听名称的时候报错了,提示只能是0-1个参数。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
[oracle@liups~]$ lsnrctl status 167778308 LISTENER_19C
LSNRCTL for Linux: Version 19.0.0.0.0- Production on08-NOV-202407:06:18
Copyright (c) 1991, 2019, Oracle. All rights reserved.
NL-00857: wrong number (0-1 needed) of arguments to "status" [oracle@liups~]$ lsnrctl status 167778308 LISTENER
LSNRCTL for Linux: Version 19.0.0.0.0- Production on08-NOV-202407:06:25
Copyright (c) 1991, 2019, Oracle. All rights reserved.
NL-00857: wrong number (0-1 needed) of arguments to "status" [oracle@liups~]$
LSNRCTL for Linux: Version 19.0.0.0.0- Production on08-NOV-202407:09:04
Copyright (c) 1991, 2019, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 19.0.0.0.0- Production StartDate08-NOV-202406:10:36 Uptime 0 days 0 hr.