如何查看oracle是否启动
时间: 2023-07-25 14:28:36 浏览: 129
可以通过以下步骤来查看Oracle是否启动:
1. 打开命令行窗口或终端。
2. 输入命令`lsnrctl status`,回车执行。
3. 如果Oracle已经启动,命令行输出会显示类似以下信息:
```
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-JAN-2019 00:00:00
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 01-JAN-2019 00:00:00
Uptime 0 days 0 hr. 1 min. 12 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/localhost/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Services Summary...
Service "ORCL" has 1 instance(s).
Instance "ORCL", status READY, has 1 handler(s) for this service...
The command completed successfully
```
其中重点查看 "STATUS of the LISTENER" 一段,如果显示 "Ready" ,则说明Oracle已经启动。
4. 如果Oracle没有启动,命令行输出会显示类似以下信息:
```
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 01-JAN-2019 00:00:00
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
```
其中重点查看 "TNS-12541: TNS:no listener" 一行,如果显示这个错误,则说明Oracle没有启动。
阅读全文