【原】ORA-01113即介质恢复试验记录

作者:david_zhang@sh 【转载时请以超链接形式标明文章】

链接:http://www.cnblogs.com/david-zhang-index/archive/2012/03/20/2407896.html

DB:oracle database 11g enterprise editon release 11.2.0.1.0 - production 32bit

OS:rhel5.3 32bit

setp1:

SQL>alter database datafile ‘/u01/app/oracle/oradata/orcl/users01.dbf' offline;

database altered.

setp2:

SQL>alter database datafile ‘/u01/app/oracle/oradata/orcl/users01.dbf' online;

ERROR at line 1:

ORA-01113:file 4 needs media recovery

ORA-01110:data file 4: ‘/u01/app/oracle/oradata/orcl/users01.dbf'

此时查看

select FILE_NAME,ONLINE_STATUS from dba_data_files;

FILE_NEME                                               ONLINE_STATUS

u01/app/oracle/oradata/orcl/users01.dbf                recovery

执行如下命令:

SQL>recover datafile 'u01/app/oracle/oradata/orcl/users01.dbf';

media recovery complete.

此时再查看

select FILE_NAME,ONLINE_STATUS from dba_data_files;

FILE_NEME                                               ONLINE_STATUS

u01/app/oracle/oradata/orcl/users01.dbf                offline

执行如下命令将文件online:

SQL>alter database datafile 'u01/app/oracle/oradata/orcl/users01.dbf' online;

database altered.
posted @ 2012-03-20 14:31  david_zhang@sh  阅读(620)  评论(0编辑  收藏  举报