Linux下启动Oracle
Linux下启动Oracle分为两步:
1)启动监听;
2)启动数据库实例;
登录服务器,切换到oracle用户
[root@localhost ~]# su - oracle
打开监听服务
[oracle@localhost ~]$ lsnrctl start
可以通过lsnrctl status命令查看Oracle监听器运行状况
[oracle@localhost ~]$ lsnrctl status
以SYSDBA用户身份登录Oracle
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 3 12:45:38 2021
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
通过startup命令启动实例
SQL> startup
ORACLE instance started.
Total System
... ...
Database mounted.
Database opened.
SQL>
Linux下关闭Oracle
关闭也分为两步
关闭数据库实例
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
关闭监听器
[oracle@localhost ~]$ lsnrctl stop