RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例

测试环境:

    操作系统  :  Red Hat Enterprise Linux ES release 4 (Nahant Update 4)   VMWARE

    数据库     :  Oracle Database 10g Release 10.2.0.4.0 - Production

    简要介绍,一台服务器A位于虚拟机VMWARE上,由于测试需要,在VMWARE上克隆了该系统作为服务器B,过了一段时间,由于数据变更,需要将服务器A上的ORACLE数据库还原恢复到服务器B上。

案例介绍:

由于这两台服务器的数据库实例名称相同、以及对应的环境基本一致(恢复目录相同,数据文件、控制文件都是一致),所以虽然是RMAN异机备份,但是这种异机恢复相对而言比较简单,不需要修改实例名称、数据库名称、指定数据文件位置等等。一般来说,这种环境的恢复还原基本没啥问题。下面介绍操作过程以及解决方法。

Step 1:通过FTP将对应的备份文件以及归档日志放置到相应的目录位置。

Step 2:还原数据库的spfile文件。

   1: [oracle@DB-Server 2014_04_01]$ rman target /

   2: Recovery Manager: Release 10.2.0.4.0 - Production on Wed Apr 2 11:30:48 2014

   3: Copyright (c) 1982, 2007, Oracle. All rights reserved.

   4: connected to target database: EPPS (not mounted)

   5: RMAN> restore spfile to pfile '/u01/app/oracle/product/10.2.0/db_1/dbs/initEPPS.ora'

   6: from '/u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnsnf_TAG20140401T020919_9mmctjx8_.bkp';

   7: Starting restore at 02-APR-14

   8: using target database control file instead of recovery catalog

   9: allocated channel: ORA_DISK_1

  10: channel ORA_DISK_1: sid=157 devtype=DISK

  11: channel ORA_DISK_1: autobackup found: /u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnsnf_TAG20140401T020919_9mmctjx8_.bkp

  12: channel ORA_DISK_1: SPFILE restore from autobackup complete

  13: Finished restore at 02-APR-14

Step 3: 关闭数据库后,利用还原spfile的初始化文件启动数据库

   1: RMAN> shutdown immediate;

   2: Oracle instance shut down

   3: RMAN> startup nomount pfile=/u01/app/oracle/product/10.2.0/db_1/dbs/initEPPS.ora

   4: connected to target database (not started)

   5: Oracle instance started

   6: Total System Global Area 1258291200 bytes

   7: Fixed Size 1267236 bytes

   8: Variable Size 822086108 bytes

   9: Database Buffers 419430400 bytes

  10: Redo Buffers 15507456 bytes

Step 4: 恢复数据库控制文件。

   1: RMAN> restore controlfile from '/u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_ncnnf_TAG20140401T020918_9mmctgpn_.bkp';

   2: Starting restore at 02-APR-14

   3: allocated channel: ORA_DISK_1

   4: channel ORA_DISK_1: sid=156 devtype=DISK

   5: channel ORA_DISK_1: restoring control file

   6: channel ORA_DISK_1: restore complete, elapsed time: 00:00:02

   7: output filename=/u01/app/oracle/oradata/EPPS/control01.ctl

   8: output filename=/u01/app/oracle/oradata/EPPS/control02.ctl

   9: output filename=/u01/app/oracle/oradata/EPPS/control03.ctl

  10: Finished restore at 02-APR-14

Step 5: 将数据库启动到mount状态

RMAN> alter database mount;

database mounted

released channel: ORA_DISK_1

Step 6: restore 数据库(中间太多数据文件restore,使用.....替代)

   1: RMAN> restore database;

   2: Starting restore at 02-APR-14

   3: Starting implicit crosscheck backup at 02-APR-14

   4: allocated channel: ORA_DISK_1

   5: channel ORA_DISK_1: sid=156 devtype=DISK

   6: Crosschecked 33 objects

   7: Finished implicit crosscheck backup at 02-APR-14

   8: Starting implicit crosscheck copy at 02-APR-14

   9: using channel ORA_DISK_1

  10: Finished implicit crosscheck copy at 02-APR-14

  11: searching for all files in the recovery area

  12: cataloging files...

  13: cataloging done

  14: List of Cataloged Files

  15: =======================

  16: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76642_9mnmw75n_.arc

  17: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76656_9mo3y8c8_.arc

  18: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76756_9moly3n8_.arc

  19: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76723_9mol3mb6_.arc

  20: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76757_9mom3dos_.arc

  21: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76745_9molbj09_.arc

  22: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76692_9mohyjn3_.arc

  23: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76702_9moj2xw6_.arc

  24: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76731_9mol8glj_.arc

  25: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76721_9mol2oxy_.arc

  26: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76705_9mojsjsk_.arc

  27: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76704_9mojrgtj_.arc

  28: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76755_9molxt45_.arc

  29: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76648_9mnn3ldq_.arc

  30: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76673_9moh0v00_.arc

  31: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76715_9mol0kby_.arc

  32: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76722_9mol34vs_.arc

  33: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76729_9mol83qs_.arc

  34: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76629_9mn45g0s_.arc

  35: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76678_9mohhts2_.arc

  36: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76701_9moj2sy7_.arc

  37: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76660_9mo3zhy5_.arc

  38: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76671_9mogy2cl_.arc

  39: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76738_9mol9kdl_.arc

  40: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76733_9mol8ry2_.arc

  41: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76634_9mn5th48_.arc

  42: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76640_9mngcxd4_.arc

  43: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76662_9moddhtr_.arc

  44: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76647_9mnn3j6h_.arc

  45: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76728_9mol7wfx_.arc

  46: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76712_9mokz4yp_.arc

  47: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76711_9mokvo53_.arc

  48: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76654_9mo0f04s_.arc

  49: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76713_9mokzopc_.arc

  50: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76646_9mnn1kch_.arc

  51: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76674_9moh19m2_.arc

  52: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76644_9mnn0mwj_.arc

  53: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76717_9mol1971_.arc

  54: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76726_9mol7n4q_.arc

  55: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76657_9mo3yjhg_.arc

  56: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76709_9mokmvll_.arc

  57: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76743_9molb6tq_.arc

  58: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76666_9mof202r_.arc

  59: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76643_9mnmx6s3_.arc

  60: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76725_9mol56d7_.arc

  61: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76679_9mohj0oh_.arc

  62: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76623_9mmctn48_.arc

  63: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76741_9mol9ym3_.arc

  64: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76751_9molqocb_.arc

  65: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76689_9mohxlfo_.arc

  66: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76627_9mn3s6ct_.arc

  67: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76719_9mol217r_.arc

  68: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76665_9mof032d_.arc

  69: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76681_9mohjgq6_.arc

  70: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76697_9moj1txh_.arc

  71: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76675_9moh2b2x_.arc

  72: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76632_9mn5f3bt_.arc

  73: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76727_9mol7r4p_.arc

  74: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76686_9mohvmv4_.arc

  75: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76710_9moknkdm_.arc

  76: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76668_9mofcnh0_.arc

  77: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76736_9mol974r_.arc

  78: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76735_9mol921f_.arc

  79: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76658_9mo3yr7l_.arc

  80: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76685_9mohn2mt_.arc

  81: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76700_9moj2qd5_.arc

  82: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76720_9mol2bjb_.arc

  83: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76747_9molbryw_.arc

  84: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76682_9mohkws7_.arc

  85: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76683_9mohlk5b_.arc

  86: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76652_9mnwb1px_.arc

  87: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76688_9mohx46t_.arc

  88: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76734_9mol8xfh_.arc

  89: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76707_9mok51fn_.arc

  90: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76753_9molx5xk_.arc

  91: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76706_9mok4rp6_.arc

  92: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76744_9molbc3r_.arc

  93: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76636_9mn7bomq_.arc

  94: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76624_9mmxzxo2_.arc

  95: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76691_9mohyg1l_.arc

  96: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76714_9mol03c5_.arc

  97: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76667_9mof24b2_.arc

  98: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76649_9mnn3qhj_.arc

  99: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76749_9molq49h_.arc

 100: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76742_9molb3sk_.arc

 101: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76630_9mn4xrw7_.arc

 102: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76628_9mn43xlb_.arc

 103: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76659_9mo3z42k_.arc

 104: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76696_9moj1hf2_.arc

 105: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76669_9mogx1o5_.arc

 106: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76732_9mol8mcw_.arc

 107: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76698_9moj2j58_.arc

 108: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76684_9mohmf4d_.arc

 109: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76750_9molqhrt_.arc

 110: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76650_9mnn4gsd_.arc

 111: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76695_9mohyv15_.arc

 112: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76645_9mnn1497_.arc

 113: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76680_9mohj8cw_.arc

 114: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76737_9mol9d51_.arc

 115: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76693_9mohym8g_.arc

 116: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76626_9mn3rdpf_.arc

 117: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76653_9mnztso1_.arc

 118: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76739_9mol9own_.arc

 119: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76664_9modzxr9_.arc

 120: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76687_9mohvsxg_.arc

 121: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76690_9mohy2kq_.arc

 122: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76631_9mn4z1y8_.arc

 123: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76716_9mol0x7b_.arc

 124: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76638_9mnc29tb_.arc

 125: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76703_9mojfodt_.arc

 126: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76746_9molbn6l_.arc

 127: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76699_9moj2nrf_.arc

 128: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76694_9mohyr9w_.arc

 129: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76663_9modynm5_.arc

 130: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76752_9molszrj_.arc

 131: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76672_9mogymcx_.arc

 132: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76639_9mndryr1_.arc

 133: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76661_9mo450yy_.arc

 134: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76708_9mokm1gj_.arc

 135: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76718_9mol1mlf_.arc

 136: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76633_9mn5nobq_.arc

 137: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76677_9mohhn4l_.arc

 138: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76740_9mol9tp9_.arc

 139: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76641_9mnh8m4b_.arc

 140: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76754_9molxjjr_.arc

 141: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76635_9mn6goh1_.arc

 142: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76651_9mntl22o_.arc

 143: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76748_9molbzjk_.arc

 144: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76670_9mogxo5p_.arc

 145: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76676_9moh3b45_.arc

 146: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76637_9mn80ps9_.arc

 147: File Name: /u03/flash_recovery_area/EPPS/archivelog/2014_04_01/o1_mf_1_76730_9mol892v_.arc

 148: File Name: /u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnsnf_TAG20140401T020919_9mmctjx8_.bkp

 149: File Name: /u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_ncnnf_TAG20140401T020918_9mmctgpn_.bkp

 150: using channel ORA_DISK_1

 151: channel ORA_DISK_1: starting datafile backupset restore

 152: channel ORA_DISK_1: specifying datafile(s) to restore from backup set

 153: restoring datafile 00002 to /u01/app/oracle/oradata/EPPS/undotbs01.dbf

 154: restoring datafile 00005 to /u02/oradata/EPPS/escmowner_d01.dbf

 155: channel ORA_DISK_1: reading from backup piece /u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnndf_FULLBACKUP_9mm9jwmb_.bkp

 156: channel ORA_DISK_1: restored backup piece 1

 157: piece handle=/u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnndf_FULLBACKUP_9mm9jwmb_.bkp tag=FULLBACKUP

 158: channel ORA_DISK_1: restore complete, elapsed time: 00:05:46

 159: channel ORA_DISK_1: starting datafile backupset restore

 160: ..............................................................

 161: channel ORA_DISK_1: reading from backup piece /u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnndf_FULLBACKUP_9mmcm1l9_.bkp

 162: channel ORA_DISK_1: restored backup piece 1

 163: piece handle=/u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnndf_FULLBACKUP_9mmcm1l9_.bkp tag=FULLBACKUP

 164: channel ORA_DISK_1: restore complete, elapsed time: 00:00:45

 165: channel ORA_DISK_1: starting datafile backupset restore

 166: channel ORA_DISK_1: specifying datafile(s) to restore from backup set

 167: restoring datafile 00001 to /u01/app/oracle/oradata/EPPS/system01.dbf

 168: restoring datafile 00022 to /u01/app/oracle/oradata/EPPS/inv_month_d02.dbf

 169:  

 170: ...............................................

 171: channel ORA_DISK_1: restored backup piece 1

 172: piece handle=/u03/flash_recovery_area/EPPS/backupset/2014_04_01/o1_mf_nnndf_FULLBACKUP_9mmct88k_.bkp tag=FULLBACKUP

 173: channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

 174: Finished restore at 02-APR-14

Step 7 : recover database

Code Snippet
  1. RMAN> recover database;
  2. Starting recover at 02-APR-14
  3. using channel ORA_DISK_1
  4. starting media recovery
  5. Oracle Error:
  6. ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
  7. ORA-01152: file 1 was not restored from a sufficiently old backup
  8. ORA-01110: data file 1: '/u01/app/oracle/oradata/EPPS/system01.dbf'
  9. RMAN-00571: ===========================================================
  10. RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
  11. RMAN-00571: ===========================================================
  12. RMAN-03002: failure of recover command at 04/02/2014 12:03:29
  13. RMAN-06053: unable to perform media recovery because of missing log
  14. RMAN-06025: no backup of log thread 1 seq 76757 lowscn 14312652139 found to restore
  15. RMAN-06025: no backup of log thread 1 seq 76756 lowscn 14312646489 found to restore
  16. RMAN-06025: no backup of log thread 1 seq 76755 lowscn 14312646378 found to restore
  17. RMAN-06025: no backup of log thread 1 seq 76754 lowscn 14312646262 found to restore
  18. RMAN-06025: no backup of log thread 1 seq 76753 lowscn 14312644427 found to restore
  19. RMAN-06025: no backup of log thread 1 seq 76752 lowscn 14312642030 found to restore
  20. RMAN-06025: no backup of log thread 1 seq 76751 lowscn 14312640281 found to restore
  21. RMAN-06025: no backup of log thread 1 seq 76750 lowscn 14312638600 found to restore
  22. RMAN-06025: no backup of log thread 1 seq 76749 lowscn 14312637270 found to restore
  23. RMAN-06025: no backup of log thread 1 seq 76748 lowscn 14312636566 found to restore
  24. RMAN-06025: no backup of log thread 1 seq 76747 lowscn 14312635786 found to restore
  25. RMAN-06025: no backup of log thread 1 seq 76746 lowscn 14312634976 found to restore
  26. RMAN-06025: no backup of log thread 1 seq 76745 lowscn 14312634196 found to restore
  27. RMAN-06025: no backup of log thread 1 seq 76744 lowscn 14312633426 found to restore
  28. RMAN-06025: no backup of log thread 1 seq 76743 lowscn 14312632650 found to restore
  29. RMAN-06025: no backup of log thread 1 seq 76742 lowscn 14312631880 found to restore
  30. RMAN-06025: no backup of log thread 1 seq 76741 lowscn 14312631120 found to restore
  31. RMAN-06025: no backup of log thread 1 seq 76740 lowscn 14312630358 found to restore
  32. RMAN-06025: no backup of log thread 1 seq 76739 lowscn 14312629580 found to restore
  33. RMAN-06025: no backup of log thread 1 seq 76738 lowscn 14312628812 found to restore
  34. RMAN-06025: no backup of log thread 1 seq 76737 lowscn 14312628019 found to restore
  35. RMAN-06025: no backup of log thread 1 seq 76736 lowscn 14312627239 found to restore
  36. RMAN-06025: no backup of log thread 1 seq 76735 lowscn 14312626460 found to restore
  37. RMAN-06025: no backup of log thread 1 seq 76734 lowscn 14312625692 found to restore
  38. RMAN-06025: no backup of log thread 1 seq 76733 lowscn 14312624924 found to restore
  39. RMAN-06025: no backup of log thread 1 seq 76732 lowscn 14312624157 found to restore
  40. RMAN-06025: no backup of log thread 1 seq 76731 lowscn 14312623377 found to restore
  41. RMAN-06025: no backup of log thread 1 seq 76730 lowscn 14312622598 found to restore
  42. RMAN-06025: no backup of log thread 1 seq 76729 lowscn 14312621836 found to restore
  43. RMAN-06025: no backup of log thread 1 seq 76728 lowscn 14312621062 found to restore
  44. RMAN-06025: no backup of log thread 1 seq 76727 lowscn 14312620313 found to restore
  45. RMAN-06025: no backup of log thread 1 seq 76726 lowscn 14312618674 found to restore
  46. RMAN-06025: no backup of log thread 1 seq 76725 lowscn 14312607258 found to restore
  47. RMAN-06025: no backup of log thread 1 seq 76723 lowscn 14312598248 found to restore
  48. RMAN-06025: no backup of log thread 1 seq 76722 lowscn 14312595919 found to restore
  49. RMAN-06025: no backup of log thread 1 seq 76721 lowscn 14312593602 found to restore
  50. RMAN-06025: no backup of log thread 1 seq 76720 lowscn 14312591274 found to restore
  51. RMAN-06025: no backup of log thread 1 seq 76719 lowscn 14312588510 found to restore
  52. RMAN-06025: no backup of log thread 1 seq 76718 lowscn 14312585861 found to restore
  53. RMAN-06025: no backup of log thread 1 seq 76717 lowscn 14312583716 found to restore
  54. RMAN-06025: no backup of log thread 1 seq 76716 lowscn 14312581142 found to restore
  55. RMAN-06025: no backup of log thread 1 seq 76715 lowscn 14312578120 found to restore
  56. RMAN-06025: no backup of log thread 1 seq 76714 lowscn 14312575570 found to restore
  57. RMAN-06025: no backup of log thread 1 seq 76713 lowscn 14312572908 found to restore
  58. RMAN-06025: no backup of log thread 1 seq 76712 lowscn 14312569377 found to restore
  59. RMAN-06025: no backup of log thread 1 seq 76711 lowscn 14312200784 found to restore
  60. RMAN-06025: no backup of log thread 1 seq 76710 lowscn 14312113790 found to restore
  61. RMAN-06025: no backup of log thread 1 seq 76709 lowscn 14312070694 found to restore
  62. RMAN-06025: no backup of log thread 1 seq 76708 lowscn 14312069907 found to restore
  63. RMAN-06025: no backup of log thread 1 seq 76707 lowscn 14312069494 found to restore
  64. RMAN-06025: no backup of log thread 1 seq 76706 lowscn 14312042189 found to restore
  65. RMAN-06025: no backup of log thread 1 seq 76705 lowscn 14312014827 found to restore
  66. RMAN-06025: no backup of log thread 1 seq 76704 lowscn 14311999274 found to restore
  67. RMAN-06025: no backup of log thread 1 seq 76703 lowscn 14311967291 found to restore
  68. RMAN-06025: no backup of log thread 1 seq 76702 lowscn 14311962023 found to restore
  69. MAN-06025: no backup of log thre
  70. RMAN>

截图如下所示

RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例

关于ORA-01547的解释如下所示:

   1: [ oracle@DB-Server dbs]$ oerr ora 1547

   2: 01547, 00000, "warning: RECOVER succeeded but OPEN RESETLOGS would get error below"

   3: // *Cause: Media recovery with one of the incomplete recovery options ended

   4: // without error. However, if the ALTER DATABASE OPEN RESETLOGS command

   5: // were attempted now, it would fail with the specified error.

   6: // The most likely cause of this error is forgetting to restore one or

   7: // more datafiles from a sufficiently old backup before executing the

   8: // incomplete recovery.

   9: // *Action: Rerun the incomplete media recovery using different datafile

  10: // backups, a different control file, or different stop criteria.

此错误的最可能的原因是执行不完全恢复前。忘记从一个足够旧的备份还原一个或 多个数据文件。

Step 8:

   1: RMAN> alter database open resetlogs;

   2:  

   3: RMAN-00571: ===========================================================

   4:  

   5: RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

   6:  

   7: RMAN-00571: ===========================================================

   8:  

   9: RMAN-03002: failure of alter db command at 04/02/2014 12:04:53

  10:  

  11: ORA-01152: file 1 was not restored from a sufficiently old backup

  12:  

  13: ORA-01110: data file 1: '/u01/app/oracle/oradata/EPPS/system01.dbf'

  14:  

  15: RMAN>

  16:  

  17: RMAN> exit

关于open resetlogs选项,是指打开数据时,重置联机重做日志(online redo log),即将重做日志的sequence置零,为什么要重置重做日志呢?不完全恢复后,原来的联机重做日志(online redo log)里面包含的是未做恢复前的数据,而这些数据对于恢复后的数据库不再有效,所以数据库会要求在open之前先对联机重做日志(online redo log)的sequence置零。Resetlogs命令表示一个数据库逻辑生存期的结束和另一个数据库逻辑生存期的开始,每次使用Resetlogs命令的时候,SCN不会被重置,不过ORACLE会重置日志序列号,而且会重置联机重做日志内容(相当于把所有的联机日志重新“格式化”)。

解决方法

此时可以通过设置隐藏参数_allow_resetlogs_corruption之后,使数据库在Open过程中,跳过某些一致性检查,从而使数据库可能跳过不一致状态。操作步骤如下

Code Snippet
  1. [oracle@DB-Server 2014_04_01]$ sqlplus / as sysdba
  2. SQL*Plus: Release 10.2.0.4.0 - Production on Wed Apr 2 12:05:57 2014
  3. Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
  4. Connected to:
  5. Oracle Database 10g Release 10.2.0.4.0 - Production
  6. SQL> create spfile from pfile='/u01/app/oracle/product/10.2.0/db_1/dbs/initEPPS.ora';
  7. File created.
  8. SQL> shutdown immediate;
  9. ORA-01109: database not open
  10. Database dismounted.
  11. ORACLE instance shut down.
  12. SQL> startup mount;
  13. ORACLE instance started.
  14. Total System Global Area 1258291200 bytes
  15. Fixed Size 1267236 bytes
  16. Variable Size 822086108 bytes
  17. Database Buffers 419430400 bytes
  18. Redo Buffers 15507456 bytes
  19. Database mounted.
  20. SQL> alter system set "_allow_resetlogs_corruption"=true scope=spfile;
  21. System altered.
  22. SQL> recover database using backup controlfile until cancel;
  23. ORA-00279: change 14311145729 generated at 04/01/2014 08:57:48 needed for
  24. thread 1
  25. ORA-00289: suggestion :
  26. /u03/flash_recovery_area/EPPS/archivelog/2014_04_02/o1_mf_1_76627_%u_.arc
  27. ORA-00280: change 14311145729 for thread 1 is in sequence #76627
  28. Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
  29. cancel
  30. Media recovery cancelled.
  31. SQL> alter database open resetlogs;
  32. Database altered.
  33. SQL> select status from v$instance;
  34. STATUS
  35. ------------
  36. OPEN

截图如下所示

RMAN异机恢复遭遇ORA-01547、ORA-01152、ORA-01110错误案例

使用了隐藏参数_allow_resetlogs_corruption后,需要从参数文件(pfile或spfile中)移除隐藏参数,并对数据库进行导入导出比较好,不过此处都是测试数据库,重要性不是很高。在此忽略这些步骤。

参考资料:

http://zionw.blog.163.com/blog/static/9985959200911111181377/

http://blog.itpub.net/751371/viewspace-709644

http://hirtom.blog.163.com/blog/static/31182683200751204727172/

上一篇:WebGL 在 OpenGL ES 指令 iOS 在 C 分歧版指令分析


下一篇:UVA1218--树形DP