联系自己做恢复时候的一个报错问题。先关闭MRP进程,然后按照备库此时最小SCN值在主库上进行备份,然后将备份上传到备库,注册进控制文件钟,进行recover database noredo恢复
此时我第一步先替换了控制文件重新启动了数据库,并将备份和数据文件重新注册进控制文件中,SWITCH DATABASE TO COPY; 之后我用命令recover database noredo恢复:
RMAN> recover database noredo;
Starting recover at 31-AUG-17
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=56 instance=jyzhao1 device type=DISK
channel ORA_DISK_1: starting incremental datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: +DATA/mynas/datafile/system.258.951608183
destination for restore of datafile 00002: +DATA/mynas/datafile/sysaux.257.951608183
destination for restore of datafile 00003: +DATA/mynas/datafile/undotbs1.259.951608185
destination for restore of datafile 00004: +DATA/mynas/datafile/users.265.951608205
destination for restore of datafile 00005: +DATA/mynas/datafile/undotbs2.261.951608185
destination for restore of datafile 00006: +DATA/mynas/datafile/dbs_d_jingyu.262.951608185
destination for restore of datafile 00007: +DATA/mynas/datafile/dbs_i_jingyu.263.951608185
destination for restore of datafile 00008: +DATA/mynas/datafile/test.264.951608185
destination for restore of datafile 00009: +DATA/mynas/datafile/test2.260.951608185
destination for restore of datafile 00010: +DATA/mynas/datafile/dbs_d_hank.274.951774467
destination for restore of datafile 00011: +DATA/mynas/datafile/dbadata.276.952933931
channel ORA_DISK_1: reading from backup piece /public/backup/incremental/inc26vsd9r18.bak
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/31/2017 15:11:05
ORA-19870: error while restoring backup piece /public/backup/incremental/inc26vsd9r18.bak
ORA-19573: cannot obtain exclusive enqueue for datafile 11
起初我认为可能是备份问题,后来查阅了报错,发现是恢复被其他的进程占用,此时想到MRP进程,检查发现没有停止mrp进程,手动停止后,发现可以正常进行恢复。