#切換oracle用戶
su - oracle
#查看oracle監聽的啟動狀態
lsnrctl status
#啟動oracle監聽
lsnrctl start
操作記錄:
[root@localhost ~]# su - oracle
Last login: Sun Feb 23 18:41:44 CST 2020 on pts/6
[oracle@localhost ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-FEB-2020 19:13:08Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
TNS-12541: TNS:no listenerTNS-12560: TNS:protocol adapter errorTNS-00511: No listenerLinux Error: 111: Connection refused
[oracle@localhost ~]$ ll
total 0
drwxr-xr-x. 3 oracle oinstall 18 Feb 23 16:28 oradiag_oracle
drwxr-xr-x. 2 oracle oinstall 82 Feb 23 18:43 response
[oracle@localhost ~]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-FEB-2020 19:13:41Copyright (c) 1991, 2009, Oracle. All rights reserved.Starting /data/u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Log messages written to /data/u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 23-FEB-2020 19:13:41
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /data/u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@localhost ~]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 23-FEB-2020 19:13:47Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 23-FEB-2020 19:13:41
Uptime 0 days 0 hr. 0 min. 6 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /data/u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
The listener supports no services
The command completed successfully