使用RMAN复制恢复开发库环境(4)

13.再次执行恢复

RMAN> run{ 2> allocate channel ch00 type disk; 3> set until sequence 13 thread 1; 4> recover database; 5> release channel ch00; 6> } released channel: ORA_DISK_1 allocated channel: ch00 channel ch00: SID=10 device type=DISK executing command: SET until clause Starting recover at 01-FEB-16 starting media recovery media recovery complete, elapsed time: 00:00:00 Finished recover at 01-FEB-16 released channel: ch00

对应alert日志:

ARC3: Archival started ARC0: STARTING ARCH PROCESSES COMPLETE Starting background process QMNC Mon Feb 01 17:22:33 2016 QMNC started with pid=27, OS id=4154 LOGSTDBY: Validating controlfile with logical metadata LOGSTDBY: Validation complete

14.开启库2

SQL> alter database open resetlogs; Database altered.

对应alert日志:

Completed: alter database open resetlogs Mon Feb 01 17:22:35 2016 db_recovery_file_dest_size of 4977 MB is 0.00% used. This is a user-specified limit on the amount of space that will be used by this database for recovery-related files, and does not reflect the amount of space available in the underlying filesystem or ASM diskgroup. Mon Feb 01 17:22:35 2016 Starting background process CJQ0 Mon Feb 01 17:22:35 2016 CJQ0 started with pid=28, OS id=4168

15.登录库2,用户、对象等信息和库1完全一致。

总结:
​1.RMAN执行restore需要数据库置于mount状态。
2.可以先将target的control控制文件拷贝到auxiliary库相同路径下,需要注意参数文件中定义的控制文件路径以及其他文件夹均需要提前在auxiliary库中创建,如果提前将控制文件拷贝到auxiliary库对应路径下,则无需restore control,相当于已经做了这不操作。
​3.resetlogs提示ORA1152错误,需要进行相应归档日志的恢复,根据拷贝过来的归档日志文件名推算seq号。

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/719487c455e3c632f19ab96444dcf8ac.html