oracle数据库状态
SQL> start nomount
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
study STARTED
SQL> select open_mode from v$database; #查看数据库打开状态
select open_mode from v$database
*
ERROR at line 1:
ORA-01507: database not mounted
SQL> alter database mount;
Database altered.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
study MOUNTED
SQL> select open_mode from v$database;
OPEN_MODE
----------
MOUNTED
SQL> alter database open;
Database altered.
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
study OPEN
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE
-------------------------------------------------------------
如果不能在上面语句中查出 数据库的状态,有两种可能:
SQL> select instance_name,status from v$instance;
select instance_name,status from v$instance
*
ERROR at line 1:
ORA-01034: ORACLE not available
1、数据库处于关闭状态
2、数据库处于僵死状态
处理方法:
1、查看oracle 进程是否存在
#ps -ef |grep ora
存在时,kill -9 PID 杀死ORACLE 进程。
2、启动数据库
$ sqlplus / as sysdba
SQL> startup
阅读(1268) | 评论(0) | 转发(0) |