数据库在非归档模式下,今天做了一个删除数据文件后的数据库恢复,情况是删除某个数据文件后,操作系统重启动了很多次, 数据库也启动到mount状态很多次(最后一步open datadase肯定是失败的),因为数据库是自启动的.刚才开始尝试使用recover database恢复数据库到当前日志状态,但是失败,提示找不到某个日志,因为数据是非归档的,所以是找不到该日志的,RMAN-06054: media recovery requesting unknown log:thread 1 seq 4 lowscn 530571. 最后还是放弃了使用recover database,直接restore后alter database open resetlogs,完成恢复.
恢复过程如下:
- run
- {
- shutdown immediate;
- startup mount; #noarchive mode,must be mount
- allocate channel c1 type disk;
- allocate channel c2 type disk;
- restore database;
- release channel c1;
- release channel c2;
- alter database open;
- 11> }
- database dismounted
- Oracle instance shut down
- connected to target database (not started)
- Oracle instance started
- database mounted
- Total System Global Area 524288000 bytes
- Fixed Size 1220360 bytes
- Variable Size 184549624 bytes
- Database Buffers 335544320 bytes
- Redo Buffers 2973696 bytes
- allocated channel: c1
- channel c1: sid=156 devtype=DISK
- allocated channel: c2
- channel c2: sid=155 devtype=DISK
- Starting restore at 06-DEC-11
- skipping datafile 1; already restored to file /u01/app/oracle/oradata/oracl/system01.dbf
- skipping datafile 4; already restored to file /u01/app/oracle/oradata/oracl/users01.dbf
- skipping datafile 2; already restored to file /u01/app/oracle/oradata/oracl/undotbs01.dbf
- skipping datafile 3; already restored to file /u01/app/oracle/oradata/oracl/sysaux01.dbf
- skipping datafile 5; already restored to file /u01/app/oracle/oradata/oracl/hxl01.dbf
- restore not done; all files readonly, offline, or already restored
- Finished restore at 06-DEC-11
- released channel: c1
- released channel: c2
- RMAN-00571: ===========================================================
- RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
- RMAN-00571: ===========================================================
- RMAN-03002: failure of alter db command at 12/06/2011 12:54:48
- ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
- RMAN> alter database open resetlogs;
- database opened
阅读(297) | 评论(0) | 转发(0) |