Friday, June 22, 2007

ASM : RMAN Restoration and Recovery

Introduction: In the below steps we will Restore the Database which is ASM Enabled.

LAB
RMAN> list backup summary;


List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
------- -- -- - ----------- --------------- ------- ------- ---------- ---
9 B A A DISK 30-MAR-07 1 1 NO TAG20070330T092016
10 B F A DISK 30-MAR-07 1 1 NO TAG20070330T092148
11 B A A DISK 30-MAR-07 1 1 NO TAG20070330T092547
12 B F A DISK 30-MAR-07 1 1 NO TAG20070330T092551
13 B A A DISK 30-MAR-07 1 1 NO TAG20070330T220423
14 B F A DISK 30-MAR-07 1 1 NO TAG20070330T220455
15 B A A DISK 30-MAR-07 1 1 NO TAG20070330T221048
16 B F A DISK 30-MAR-07 1 1 NO TAG20070330T221058
17 B A A DISK 31-MAR-07 1 1 NO TAG20070331T083321
18 B F A DISK 31-MAR-07 1 1 NO TAG20070331T083331
19 B A A DISK 31-MAR-07 1 1 NO TAG20070331T083742
20 B F A DISK 31-MAR-07 1 1 NO TAG20070331T083747

RMAN>

SHUTDOWN the Database and Startup NoMount

RMAN> restore database from tag='TAG20070330T092148';

Starting restore at 31-MAR-07
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to +DATA/odb/datafile/system.256.617411373
restoring datafile 00002 to +DATA/odb/datafile/undotbs1.258.617411379
restoring datafile 00003 to +DATA/odb/datafile/sysaux.257.617411377
restoring datafile 00004 to +DATA/odb/datafile/users.259.617411381
channel ORA_DISK_1: reading from backup piece
+ARCH/odb/backupset/2007_03_30/nnndf0_tag20070330t092148_0.286.618571311

channel ORA_DISK_1: restored backup piece 1
piece handle=+ARCH/odb/backupset/2007_03_30/nnndf0_tag20070330t092148_0.286.618571311
tag=TAG20070330T092148

channel ORA_DISK_1: restore complete, elapsed time: 00:02:33
Finished restore at 31-MAR-07

RMAN>

RMAN> recover database delete archivelog maxsize 50m;

Starting recover at 31-MAR-07
using channel ORA_DISK_1

starting media recovery

archive log thread 1 sequence 19 is already on disk as file
+ARCH/odb/archivelog/2007_03_30/thread_1_seq_19.291.618617445

archive log thread 1 sequence 20 is already on disk as file
+ARCH/odb/archivelog/2007_03_31/thread_1_seq_20.293.618654795

archive log thread 1 sequence 21 is already on disk as file
+ARCH/odb/archivelog/2007_03_31/thread_1_seq_21.265.618655059

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=17
channel ORA_DISK_1: reading from backup piece
+ARCH/odb/backupset/2007_03_30/annnf0_tag20070330t092547_0.283.618571549

channel ORA_DISK_1: restored backup piece 1
piece handle=+ARCH/odb/backupset/2007_03_30/annnf0_tag20070330t092547_0.283.618571549
tag=TAG20070330T092547

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
archive log filename=+ARCH/odb/archivelog/2007_03_31/thread_1_seq_17.263.618657391 thread=1
sequence=17

channel default: deleting archive log(s)
archive log filename=+ARCH/odb/archivelog/2007_03_31/thread_1_seq_17.263.618657391 recid=17
stamp=618657393

channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=18
channel ORA_DISK_1: reading from backup piece
+ARCH/odb/backupset/2007_03_30/annnf0_tag20070330t220423_0.280.618617069

channel ORA_DISK_1: restored backup piece 1
piece handle=+ARCH/odb/backupset/2007_03_30/annnf0_tag20070330t220423_0.280.618617069
tag=TAG20070330T220423

channel ORA_DISK_1: restore complete, elapsed time: 00:00:15
archive log filename=+ARCH/odb/archivelog/2007_03_31/thread_1_seq_18.263.618657397
thread=1 sequence=18

channel default: deleting archive log(s)
archive log filename=+ARCH/odb/archivelog/2007_03_31/thread_1_seq_18.263.618657397 recid=18
stamp=618657407

archive log filename=+ARCH/odb/archivelog/2007_03_30/thread_1_seq_19.291.618617445 thread=1
sequence=19

media recovery complete, elapsed time: 00:00:53
Finished recover at 31-MAR-07

RMAN>
RMAN> alter database open;

database opened

RMAN>

Summary : Using RMAN we have restored the ASM Enabled Database from a BackupSet.

Popular Posts