Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5205255
  • 博文数量: 1004
  • 博客积分: 8199
  • 博客等级: 中将
  • 技术积分: 13042
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-25 20:19
个人简介

脚踏实地、勇往直前!

文章分类

全部博文(1004)

文章存档

2020年(1)

2019年(93)

2018年(208)

2017年(81)

2016年(49)

2015年(50)

2014年(170)

2013年(52)

2012年(177)

2011年(93)

2010年(30)

分类: Oracle

2011-12-06 17:43:23

数据库在非归档模式下,今天做了一个删除数据文件后的数据库恢复,情况是删除某个数据文件后,操作系统重启动了很多次, 数据库也启动到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,完成恢复.

恢复过程如下:

  1. run
  2. {
  3. shutdown immediate;
  4. startup mount; #noarchive mode,must be mount
  5. allocate channel c1 type disk;
  6. allocate channel c2 type disk;
  7. restore database;
  8. release channel c1;
  9. release channel c2;
  10. alter database open;
  11. 11> }

  12. database dismounted
  13. Oracle instance shut down

  14. connected to target database (not started)
  15. Oracle instance started
  16. database mounted

  17. Total System Global Area 524288000 bytes

  18. Fixed Size 1220360 bytes
  19. Variable Size 184549624 bytes
  20. Database Buffers 335544320 bytes
  21. Redo Buffers 2973696 bytes

  22. allocated channel: c1
  23. channel c1: sid=156 devtype=DISK

  24. allocated channel: c2
  25. channel c2: sid=155 devtype=DISK

  26. Starting restore at 06-DEC-11

  27. skipping datafile 1; already restored to file /u01/app/oracle/oradata/oracl/system01.dbf
  28. skipping datafile 4; already restored to file /u01/app/oracle/oradata/oracl/users01.dbf
  29. skipping datafile 2; already restored to file /u01/app/oracle/oradata/oracl/undotbs01.dbf
  30. skipping datafile 3; already restored to file /u01/app/oracle/oradata/oracl/sysaux01.dbf
  31. skipping datafile 5; already restored to file /u01/app/oracle/oradata/oracl/hxl01.dbf
  32. restore not done; all files readonly, offline, or already restored
  33. Finished restore at 06-DEC-11

  34. released channel: c1

  35. released channel: c2

  36. RMAN-00571: ===========================================================
  37. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  38. RMAN-00571: ===========================================================
  39. RMAN-03002: failure of alter db command at 12/06/2011 12:54:48
  40. ORA-01589: must use RESETLOGS or NORESETLOGS option for database open

  41. RMAN> alter database open resetlogs;

  42. database opened
阅读(1892) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~