ORA-01113: file 1 needs media recovery

数据库服务启动。此时用sqlplus命令进入数据库,出现SQL>提示。

此时执行语句却发现ORA-01109: database not open

用alter database open出现错误

ORA-01113: file 2 needs media recovery
ORA-01110: data file 2: 'C:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/UNDOTBS01.DBF'

查看数据库和实例状态

select status from v$instance;

STATUS
------------
MOUNTED



SQL> select open_mode from v$database;

OPEN_MODE
----------
MOUNTED


都市mounted状态而不是open

于是,用命令recover datafile 'C:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/UNDOTBS01.DBF';

提示Media recovery complete.

SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 3 needs media recovery
ORA-01110: data file 3: 'C:/ORACLE/PRODUCT/10.2.0/ORADATA/ORCL/SYSAUX01.DBF'

反复使用recover datafile,最后用alter database open打开了数据库

再查看

SQL> select open_mode from v$database;

OPEN_MODE
----------
READ WRITE

对了。

recover datafile----->可改为recover database.


再检查

SQL> select instance_name, status from v$instance;

INSTANCE_NAME    STATUS
---------------- ------------
orcl             OPEN


你可能感兴趣的:(media,status,database,recovery,数据库服务)