今天一台服务器的开启了归档,导致文件系统撑满了,由于我们是开发库,没必要开启归档,所以就把数据库改为非归档模式,但是在修改的时候碰到ORA-01143: cannot disable media recovery - file 20 needs media recovery错误。后来将数据文件恢复后才将数据库修改成功。
下面为操作过程
- SQL> shutdown immediate;
- Database closed.
- Database dismounted.
- ORACLE instance shut down.
- SQL>
- SQL>
- SQL> startup mount
- ORACLE instance started.
- Total System Global Area 630521856 bytes
- Fixed Size 2146992 bytes
- Variable Size 369102160 bytes
- Database Buffers 251658240 bytes
- Redo Buffers 7614464 bytes
- Database mounted.
- SQL>
- SQL>
- SQL> alter database noarchivelog;
- alter database noarchivelog
- *
- ERROR at line 1:
- ORA-01143: cannot disable media recovery - file 20 needs media recovery
- ORA-01110: data file 20: '/home/oracle/oradata/orarpt/vms_rpt.dbf'
- SQL> recover datafile 20
- ORA-00279: change 1162349663 generated at 11/22/2011 00:03:58 needed for thread
- 1
- ORA-00289: suggestion :
- /home/oracle/product/11.1.0/db_1/dbs/arch1_4578_743881575.dbf
- ORA-00280: change 1162349663 for thread 1 is in sequence #4578
- Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
- Log applied.
- Media recovery complete.
- SQL> alter database noarchivelog;
- Database altered.
- alter database datafile 20 online;
- SQL> alter database open;
- Database altered.