Monday, May 26, 2014

Perform RMAN Incomplete recovery using restore point

(1) Script to perform RMAN incomplete recovery using restore point
run
{
startup mount;
set until restore point P2_1543007;
restore database;
recover database parallel;
sql "alter database open resetlogs";
}

(2)Ouput of execution of the script
RMAN> shutdown immediate;

database closed
database dismounted
Oracle instance shut down

RMAN> @ ./rman/rman_incomplete_recovery_time.cmd

RMAN> run
2> {
3> startup mount ;
4> set until restore point  P2_1543007;
5> restore database;
6> recover database parallel;
7> sql "alter database open resetlogs";
8> }
connected to target database (not started)
Oracle instance started
database mounted

Total System Global Area     730714112 bytes

Fixed Size                     2256832 bytes
Variable Size                452984896 bytes
Database Buffers             272629760 bytes
Redo Buffers                   2842624 bytes

executing command: SET until clause

Starting restore at 26-MAY-14
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=21 device type=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: SID=27 device type=DISK
allocated channel: ORA_DISK_3
channel ORA_DISK_3: SID=28 device type=DISK
allocated channel: ORA_DISK_4
channel ORA_DISK_4: SID=29 device type=DISK
allocated channel: ORA_DISK_5
channel ORA_DISK_5: SID=30 device type=DISK
flashing back control file to SCN 1543047

skipping datafile 4; already restored to file +DATA/cvrman/datafile/users.259.847354795
skipping datafile 5; already restored to file +DATA/cvrman/datafile/example_new.dbf
creating datafile file number=7 name=+DATA/cvrman/datafile/tbs2.328.848469625
channel ORA_DISK_1: restoring datafile 00006
input datafile copy RECID=83 STAMP=848217961 file name=+DATA/cvrman/datafile/tbs1.294.847433665
destination for restore of datafile 00006: +DATA/cvrman/datafile/tbs1_new.dbf
channel ORA_DISK_2: starting datafile backup set restore
channel ORA_DISK_2: specifying datafile(s) to restore from backup set
channel ORA_DISK_2: restoring datafile 00003 to +DATA/cvrman/datafile/undotbs1.318.848201233
channel ORA_DISK_2: reading from backup piece +DATA/cvrman/backupset/2014_05_22/nnndf0_tag20140522t051830_0.290.848207929
channel ORA_DISK_3: starting datafile backup set restore
channel ORA_DISK_3: specifying datafile(s) to restore from backup set
channel ORA_DISK_3: restoring datafile 00002 to +DATA/cvrman/datafile/sysaux.257.847354793
channel ORA_DISK_3: reading from backup piece +DATA/cvrman/backupset/2014_05_22/nnndf0_tag20140522t051830_0.287.848207921
channel ORA_DISK_4: starting datafile backup set restore
channel ORA_DISK_4: specifying datafile(s) to restore from backup set
channel ORA_DISK_4: restoring datafile 00001 to +DATA/cvrman/datafile/system.256.847354793
channel ORA_DISK_4: reading from backup piece +DATA/cvrman/backupset/2014_05_22/nnndf0_tag20140522t051830_0.313.848207917
channel ORA_DISK_1: copied datafile copy of datafile 00006
output file name=+DATA/cvrman/datafile/tbs1_new.dbf RECID=0 STAMP=0
channel ORA_DISK_2: piece handle=+DATA/cvrman/backupset/2014_05_22/nnndf0_tag20140522t051830_0.290.848207929 tag=TAG20140522T051830
channel ORA_DISK_2: restored backup piece 1
channel ORA_DISK_2: restore complete, elapsed time: 00:00:09
channel ORA_DISK_3: piece handle=+DATA/cvrman/backupset/2014_05_22/nnndf0_tag20140522t051830_0.287.848207921 tag=TAG20140522T051830
channel ORA_DISK_3: restored backup piece 1
channel ORA_DISK_3: restore complete, elapsed time: 00:01:06
channel ORA_DISK_4: piece handle=+DATA/cvrman/backupset/2014_05_22/nnndf0_tag20140522t051830_0.313.848207917 tag=TAG20140522T051830
channel ORA_DISK_4: restored backup piece 1
channel ORA_DISK_4: restore complete, elapsed time: 00:01:16
Finished restore at 26-MAY-14

Starting recover at 26-MAY-14
using channel ORA_DISK_1
using channel ORA_DISK_2
using channel ORA_DISK_3
using channel ORA_DISK_4
using channel ORA_DISK_5
datafile 4 not processed because file is read-only
datafile 5 not processed because file is read-only

starting media recovery

archived log for thread 1 with sequence 8 is already on disk as file +DATA/cvrman/archivelog/2014_05_25/thread_1_seq_8.319.848465559
archived log for thread 1 with sequence 9 is already on disk as file +DATA/cvrman/archivelog/2014_05_25/thread_1_seq_9.320.848465561
archived log for thread 1 with sequence 10 is already on disk as file +DATA/cvrman/archivelog/2014_05_25/thread_1_seq_10.317.848465559
archived log for thread 1 with sequence 1 is already on disk as file +DATA/cvrman/archivelog/2014_05_25/thread_1_seq_1.325.848467105
archived log for thread 1 with sequence 2 is already on disk as file +DATA/cvrman/archivelog/2014_05_25/thread_1_seq_2.301.848469759
archived log for thread 1 with sequence 3 is already on disk as file +DATA/cvrman/archivelog/2014_05_25/thread_1_seq_3.309.848480471
archived log for thread 1 with sequence 4 is already on disk as file +DATA/cvrman/archivelog/2014_05_25/thread_1_seq_4.280.848480485
archived log for thread 1 with sequence 1 is already on disk as file +DATA/cvrman/archivelog/2014_05_26/thread_1_seq_1.340.848560257
archived log for thread 1 with sequence 2 is already on disk as file +DATA/cvrman/archivelog/2014_05_26/thread_1_seq_2.338.848560891
archived log for thread 1 with sequence 3 is already on disk as file +DATA/cvrman/archivelog/2014_05_26/thread_1_seq_3.324.848560897
archived log for thread 1 with sequence 1 is already on disk as file +DATA/cvrman/archivelog/2014_05_26/thread_1_seq_1.326.848571335
archived log for thread 1 with sequence 2 is already on disk as file +DATA/cvrman/archivelog/2014_05_26/thread_1_seq_2.343.848571337
archived log for thread 1 with sequence 3 is already on disk as file +DATA/cvrman/archivelog/2014_05_26/thread_1_seq_3.345.848571341
archived log for thread 1 with sequence 4 is already on disk as file +DATA/cvrman/archivelog/2014_05_26/thread_1_seq_4.282.848571519
archived log file name=+DATA/cvrman/archivelog/2014_05_25/thread_1_seq_8.319.848465559 thread=1 sequence=8
archived log file name=+DATA/cvrman/archivelog/2014_05_25/thread_1_seq_9.320.848465561 thread=1 sequence=9
archived log file name=+DATA/cvrman/archivelog/2014_05_25/thread_1_seq_10.317.848465559 thread=1 sequence=10
archived log file name=+DATA/cvrman/archivelog/2014_05_25/thread_1_seq_1.325.848467105 thread=1 sequence=1
archived log file name=+DATA/cvrman/archivelog/2014_05_25/thread_1_seq_2.301.848469759 thread=1 sequence=2
archived log file name=+DATA/cvrman/archivelog/2014_05_25/thread_1_seq_3.309.848480471 thread=1 sequence=3
archived log file name=+DATA/cvrman/archivelog/2014_05_25/thread_1_seq_4.280.848480485 thread=1 sequence=4
archived log file name=+DATA/cvrman/archivelog/2014_05_26/thread_1_seq_1.340.848560257 thread=1 sequence=1
archived log file name=+DATA/cvrman/archivelog/2014_05_26/thread_1_seq_2.338.848560891 thread=1 sequence=2
archived log file name=+DATA/cvrman/archivelog/2014_05_26/thread_1_seq_3.324.848560897 thread=1 sequence=3
archived log file name=+DATA/cvrman/archivelog/2014_05_26/thread_1_seq_1.326.848571335 thread=1 sequence=1
archived log file name=+DATA/cvrman/archivelog/2014_05_26/thread_1_seq_2.343.848571337 thread=1 sequence=2
archived log file name=+DATA/cvrman/archivelog/2014_05_26/thread_1_seq_3.345.848571341 thread=1 sequence=3
archived log file name=+DATA/cvrman/archivelog/2014_05_26/thread_1_seq_4.282.848571519 thread=1 sequence=4
media recovery complete, elapsed time: 00:00:41
Finished recover at 26-MAY-14

sql statement: alter database open resetlogs

RMAN> **end-of-file**


No comments: