标题: How To Restore Archivelogs That Belongs To Another Incarnation [打印本页] 作者: 刘泽宇 时间: 2024-7-21 17:52 标题: How To Restore Archivelogs That Belongs To Another Incarnation 目标:
NOTE: In the images and/or the document content below, the user information and environment data used represents fictitious data from the Oracle sample schema(s), Public Documentation delivered with an Oracle database product or other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental and not intended in any manner.
For the purposes of this document, the following fictitious environment is used as an example to describe the procedure:
ORACLE_SID: test
DBNAME: ORA12, V112
***********************
How to restore archives of previous incarnation for a database
处理方法:
Create a test instance, if using same ORACLE_HOME then change the RDBMS parameter DB_UNIQUE_NAME and INSTANCE_NAME to a different value ,with minimal memory (SGA) settings.
A) Steps to be used for versions before 11.2
echo %ORACLE_SID%
test
rman target / catalog=<RmanUsername>/<password>@<catalog_tns>
Recovery Manager: Release 11.2.0.1.0 - Production on Mon May 30 13:33:03 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORA12 (not mounted) ===> test instance in no-mount stage
connected to recovery catalog database
RMAN> set dbid=1362454908
executing command: SET DBID
database name is "ORA12" and DBID is 1362454908
RMAN> list incarnation of database ;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
743 756 ORA12 1362454908 PARENT 1 02-APR-10
743 744 ORA12 1362454908 PARENT 940976 27-APR-11
743 970 ORA12 1362454908 CURRENT 1531084 30-MAY-11
RMAN> list backup of archivelog sequence 10;
specification does not match any backup in the repository
RMAN> reset database to incarnation 744;
database reset to incarnation 744
RMAN> list backup of archivelog sequence 10;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
873 73.75M DISK 00:00:08 26-MAY-11
BP Key: 901 Status: AVAILABLE Compressed: NO Tag: TAG20110526T141851
Piece Name: \<path>\<backuppiece_name>
List of Archived Logs in backup set 873
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 10 1170143 17-MAY-11 1221117 22-MAY-11
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
885 73.75M DISK 00:00:11 27-MAY-11
BP Key: 913 Status: AVAILABLE Compressed: NO Tag: TAG20110527T222645
Piece Name: \<path>\<backuppiece_name>
List of Archived Logs in backup set 885
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 10 1170143 17-MAY-11 1221117 22-MAY-11