RMAN Restoration and Recovery


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.618657391thread=1
sequence=17
channel default: deleting archive log(s)
archive log filename=+ARCH/odb/archivelog/2007_03_31/thread_1_seq_17.263.618657391recid=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.618657397recid=18
stamp=618657407
archive log filename=+ARCH/odb/archivelog/2007_03_30/thread_1_seq_19.291.618617445thread=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>
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: