linux查看oracle是否启动
时间: 2023-11-22 07:38:37 浏览: 137
linux系统启动oracle
可以使用以下命令查看Oracle是否启动:
1. 检查Oracle进程是否存在:
```
ps -ef | grep ora_
```
如果看到类似以下输出,则表示Oracle已经启动:
```
oracle 1751 1 0 2018 ? 00:00:00 ora_pmon_orcl
oracle 1753 1 0 2018 ? 00:00:02 ora_dbw0_orcl
oracle 1755 1 0 2018 ? 00:00:00 ora_lgwr_orcl
oracle 1757 1 0 2018 ? 00:00:00 ora_ckpt_orcl
oracle 1759 1 0 2018 ? 00:00:00 ora_smon_orcl
oracle 1761 1 0 2018 ? 00:00:03 ora_reco_orcl
oracle 1763 1 0 2018 ? 00:00:00 ora_mmon_orcl
```
2. 检查Oracle监听器是否启动:
```
lsnrctl status
```
如果看到类似以下输出,则表示Oracle监听器已经启动:
```
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 16-DEC-2019 10:30:02
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 16-DEC-2019 10:29:31
Uptime 0 days 0 hr. 0 min. 30 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0/dbhome_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=127.0.0.1)(PORT=1521)))
Services Summary...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
```
阅读全文