ITPub博客

首页 > 数据库 > Oracle > 升级失败后对数据库进行恢复 (2)

升级失败后对数据库进行恢复 (2)

原创 Oracle 作者:xchui702 时间:2014-02-24 10:31:46 0 删除 编辑

在上一篇文章中叙述了原因,本篇中将描述恢复的过程:
非常简单,如下:
RMAN> restore database;
 
Starting restore at 24-FEB-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=388 device type=DISK
 
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to +DATA/cdcrm02/datafile/system.330.824013365
channel ORA_DISK_1: restoring datafile 00002 to +DATA/cdcrm02/datafile/sysaux.331.824013389
channel ORA_DISK_1: restoring datafile 00003 to +DATA/cdcrm02/datafile/undotbs1.332.824013405
channel ORA_DISK_1: restoring datafile 00004 to +DATA/cdcrm02/datafile/users.334.824013425
channel ORA_DISK_1: restoring datafile 00005 to +DATA/cdcrm02/datafile/dataccrm1.338.824066435
channel ORA_DISK_1: restoring datafile 00006 to +DATA/cdcrm02/datafile/indxccrm1.339.824066607
channel ORA_DISK_1: reading from backup piece /expdump/back/CDCRM02/backupset/2014_02_20/o1_mf_nnndf_TAG20140220T132233_9jc48t6r_.bkp
channel ORA_DISK_1: piece handle=/expdump/back/CDCRM02/backupset/2014_02_20/o1_mf_nnndf_TAG20140220T132233_9jc48t6r_.bkp tag=TAG20140220T132233
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:05:25
Finished restore at 24-FEB-14
 
RMAN> RUN
{
SET UNTIL SEQUENCE 761 THREAD 1;
  RECOVER DATABASE;  # recovers through log 761, 761 号log是不会也不用恢复的.
}    2> 3> 4> 5>
 
executing command: SET until clause
 
Starting recover at 24-FEB-14
using channel ORA_DISK_1
 
starting media recovery
 
archived log for thread 1 with sequence 759 is already on disk as file /expdump/back/CDCRM02/archivelog/2014_02_20/o1_mf_1_759_9jc4c7kz_.arc
archived log for thread 1 with sequence 760 is already on disk as file /expdump/back/CDCRM02/archivelog/2014_02_20/o1_mf_1_760_9jcn6xq6_.arc
archived log file name=/expdump/back/CDCRM02/archivelog/2014_02_20/o1_mf_1_759_9jc4c7kz_.arc thread=1 sequence=759
archived log file name=/expdump/back/CDCRM02/archivelog/2014_02_20/o1_mf_1_760_9jcn6xq6_.arc thread=1 sequence=760
media recovery complete, elapsed time: 00:00:06
Finished recover at 24-FEB-14

RMAN> alter database open;    --进行了不还原恢复,当然直接open,是打不开数据库的.
 
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of alter db command at 02/24/2014 10:06:26
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
 
RMAN> alter database open resetlogs;    
 
database opened

--至此,数据库又恢复到升级前的状态了,也可以正常使用了.
我将针对升级失败的情况,做一些参数上的修改,再升级一次.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/674865/viewspace-1086727/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-05-16

  • 博文量
    38
  • 访问量
    117690