How to restore an RMAN backup from TAG


SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 608174080 bytes
Fixed Size 2085840 bytes
Variable Size 381684784 bytes
Database Buffers 218103808 bytes
Redo Buffers 6299648 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64 bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@dbhost oracle]$ rman target /
Recovery Manager: Release 10.2.0.4.0 - Production on Fri Sep 14 16:34:16 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: DBDEV (DBID=2704902266, not open)
RMAN> run {
2> allocate channel ch1 device type DISK;
3> allocate channel ch2 device type DISK;
4> restore database from TAG='DBDEV_002013869_12092012';
5> }
using target database control file instead of recovery catalog
allocated channel: ch1
channel ch1: sid=156 devtype=DISK
allocated channel: ch2
channel ch2: sid=155 devtype=DISK
Starting restore at 14-SEP-12channel ch2: starting datafile backupset restore
channel ch2: specifying datafile(s) to restore from backup set
restoring datafile 00010 to /u01/oradata/DBDEV/abc_lref_d01.dbf
restoring datafile 00016 to /u01/oradata/DBDEV/irt_ltrn_d01.dbf
restoring datafile 00017 to /u01/oradata/DBDEV/irt_ltrn_i01.dbf
restoring datafile 00019 to /u01/oradata/DBDEV/api_stage_i01.dbf
restoring datafile 00021 to /u01/oradata/DBDEV/DBpoefi01.dbf
channel ch2: reading from backup piece /u01/rman/DBDEV/DB_DBDEV_jpnl1bg4_1_1
channel ch1: starting datafile backupset restore
channel ch1: specifying datafile(s) to restore from backup set
restoring datafile 00005 to /u01/oradata/DBDEV/audit_data01.dbf
restoring datafile 00008 to /u01/oradata/DBDEV/abc_long_d01.dbf
restoring datafile 00009 to /u01/oradata/DBDEV/abc_long_i01.dbf
restoring datafile 00011 to /u01/oradata/DBDEV/abc_lref_i01.dbf
restoring datafile 00012 to /u01/oradata/DBDEV/abc_ltrn_d01.dbf
restoring datafile 00013 to /u01/oradata/DBDEV/abc_ltrn_i01.dbf
channel ch1: reading from backup piece /u01/rman/DBDEV/DB_DBDEV_jqnl1bg4_1_1
channel ch1: restored backup piece 1
piece handle=/u01/rman/DBDEV/DB_DBDEV_jqnl1bg4_1_1 tag=DBDEV_002013869_12092012
channel ch1: restore complete, elapsed time: 00:01:45
channel ch1: starting datafile backupset restore
channel ch1: specifying datafile(s) to restore from backup set
restoring datafile 00002 to /u01/oradata/DBDEV/undotbs01.dbf
restoring datafile 00006 to /u01/oradata/DBDEV/abc_htrn_d01.dbf
restoring datafile 00014 to /u01/oradata/DBDEV/irt_htrn_d01.dbf
restoring datafile 00015 to /u01/oradata/DBDEV/irt_htrn_i01.dbf
restoring datafile 00020 to /u01/oradata/DBDEV/DBpoefd01.dbf
restoring datafile 00023 to /u01/oradata/DBDEV/isite_i01.dbf
channel ch1: reading from backup piece /u01/rman/DBDEV/DB_DBDEV_jrnl1bg4_1_1
channel ch2: restored backup piece 1
piece handle=/u01/rman/DBDEV/DB_DBDEV_jpnl1bg4_1_1 tag=DBDEV_002013869_12092012
channel ch2: restore complete, elapsed time: 00:02:41
channel ch2: starting datafile backupset restore
channel ch2: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /u01/oradata/DBDEV/system01.dbf
restoring datafile 00003 to /u01/oradata/DBDEV/sysaux01.dbf
restoring datafile 00004 to /u01/oradata/DBDEV/users01.dbf
restoring datafile 00007 to /u01/oradata/DBDEV/abc_htrn_i01.dbf
restoring datafile 00018 to /u01/oradata/DBDEV/api_stage_d01.dbf
restoring datafile 00022 to /u01/oradata/DBDEV/isite_d01.dbf
channel ch2: reading from backup piece /u01/rman/DBDEV/DB_DBDEV_jsnl1bg4_1_1
channel ch1: restored backup piece 1
piece handle=/u01/rman/DBDEV/DB_DBDEV_jrnl1bg4_1_1 tag=DBDEV_002013869_12092012
channel ch1: restore complete, elapsed time: 00:02:22
channel ch2: restored backup piece 1
piece handle=/u01/rman/DBDEV/DB_DBDEV_jsnl1bg4_1_1 tag=DBDEV_002013869_12092012
channel ch2: restore complete, elapsed time: 00:02:20
Finished restore at 14-SEP-12
released channel: ch1
released channel: ch2
RMAN> exit
Recovery Manager complete.
[oracle@dbhost oracle]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Fri Sep 14 16:40:58 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> recover database until cancel;
ORA-00279: change 8871877088827 generated at 09/12/2012 16:36:02 needed for
thread 1
ORA-00289: suggestion :
/u01/app/oracle/product/10.2.0/db_1/dbs/arch1_3023_768401970.dbf
ORA-00280: change 8871877088827 for thread 1 is in sequence #3023

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
CANCEL
Media recovery cancelled.
SQL> alter database open resetlogs;
Database altered.
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: