$ rman @restore_tag.rman

------- MANUAL RESTORE -------

LAX:(SYS@db01)> show parameter recovery

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_recovery_file_dest                string      /oracle/flashrecovery

db_recovery_file_dest_size           big integer 2G

recovery_parallelism                 integer     0

LAX:(SYS@db01)> show parameter db_name

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_name                              string      db01

LAX:(SYS@db01)> show parameter unique

NAME                                 TYPE        VALUE

------------------------------------ ----------- ------------------------------

db_unique_name                       string      lax_db01

LAX:(SYS@db01)> !ls /oracle/flashrecovery

LAX_DB01

LAX:(SYS@db01)>

Note that FRA is created using db_unique_name.

[oracle@lax:db01]/home/oracle

$ rman @restore_tag.rman

Recovery Manager: Release 11.2.0.3.0 - Production on Sun Sep 8 17:42:56 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target;

2> configure controlfile autobackup on;

3> show all;

4> ########################################

5> # BACKUP USING TAG

6> ########################################

7> run{

8> allocate channel d1 device type disk;

9> backup as compressed backupset

10>   incremental level 0 check logical database tag 'AAA'

11>   include current controlfile

12>   plus archivelog not backed up 1 times delete input tag 'AAA';

13> release channel d1;

14> }

15> ########################################

16> # LIST AND VALIDATE BACKUP USING TAG

17> ########################################

18>

19> list backup of controlfile;

20> list backup by file tag 'AAA';

21> restore validate spfile to '/tmp/spfiledb01.ora' from autobackup;

22> restore validate controlfile from tag 'AAA';

23> restore validate controlfile from autobackup;

24> restore validate database from tag 'AAA';

25> restore validate archivelog from time 'SYSDATE-6/1440' from tag 'AAA';

26> ########################################

27> # CREATE TBS AND NEW BACKUP WITHOUT TAG

28> ########################################

29> sql 'create tablespace junk datafile size 16m';

30> backup check logical database plus archivelog not backed up 1 times delete input;

31> list backup summary;

32> ########################################

33> # RESTORE FROM AUTOBACKUP TAKES LATEST

34> ########################################

35> restore validate spfile to '/tmp/spfiledb01.ora' from autobackup;

36> restore validate controlfile from autobackup;

37> host "mv /u01/app/oracle/product/11.2.0.3/db_1/dbs/spfiledb01.ora /u01/app/oracle/product/11.2.0.3/db_1/dbs/spfiledb01.ora.old";

38> run{

39> allocate channel d1 device type disk;

40> startup force nomount;

41> set dbid 1452485914

42> restore spfile from autobackup RECOVERY AREA '/oracle/flashrecovery' DB_NAME=LAX_DB01;

43> startup force nomount;

44> set dbid 1452485914

45> restore controlfile from tag 'AAA';

46> alter database mount;

47> restore database from tag 'AAA';

48> recover database from tag 'AAA';

49> alter database open resetlogs;

50> release channel d1;

51> }

52> exit

connected to target database: DB01 (DBID=1452485914)

using target database control file instead of recovery catalog

old RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP ON;

new RMAN configuration parameters:

CONFIGURE CONTROLFILE AUTOBACKUP ON;

new RMAN configuration parameters are successfully stored

RMAN configuration parameters for database with db_unique_name LAX_DB01 are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default

CONFIGURE BACKUP OPTIMIZATION OFF; # default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; # default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0.3/db_1/dbs/snapcf_db01.f'; # default

allocated channel: d1

channel d1: SID=38 device type=DISK

Starting backup at 08-sep-2013 17:43:00

current log archived

skipping archived logs of thread 1 from sequence 6 to 8; already backed up

channel d1: starting compressed archived log backup set

channel d1: specifying archived log(s) in backup set

input archived log thread=1 sequence=3 RECID=191 STAMP=825615785

channel d1: starting piece 1 at 08-sep-2013 17:43:08

channel d1: finished piece 1 at 08-sep-2013 17:43:15

piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6dwg7_.bkp tag=AAA comment=NONE

channel d1: backup set complete, elapsed time: 00:00:07

channel d1: deleting archived log(s)

archived log file name=/oracle/flashrecovery/LAX_DB01/archivelog/2013_09_08/o1_mf_1_3_92t6dsfj_.arc RECID=191 STAMP=825615785

channel d1: deleting archived log(s)

archived log file name=/oracle/flashrecovery/LAX_DB01/archivelog/2013_09_08/o1_mf_1_6_92so6vdd_.arc RECID=175 STAMP=825607275

archived log file name=/oracle/flashrecovery/LAX_DB01/archivelog/2013_09_08/o1_mf_1_7_92so95p2_.arc RECID=174 STAMP=825607275

archived log file name=/oracle/flashrecovery/LAX_DB01/archivelog/2013_09_08/o1_mf_1_8_92sobph5_.arc RECID=176 STAMP=825607276

Finished backup at 08-sep-2013 17:43:20

Starting backup at 08-sep-2013 17:43:21

channel d1: starting compressed incremental level 0 datafile backup set

channel d1: specifying datafile(s) in backup set

input datafile file number=00003 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_undotbs_8ymzsr1w_.dbf

input datafile file number=00004 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_user_dat_8yo8879m_.dbf

input datafile file number=00001 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_system_8ymzrcgk_.dbf

input datafile file number=00002 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_sysaux_8ymzrr20_.dbf

channel d1: starting piece 1 at 08-sep-2013 17:43:22

channel d1: finished piece 1 at 08-sep-2013 17:43:48

piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_nnnd0_AAA_92t6ffwn_.bkp tag=AAA comment=NONE

channel d1: backup set complete, elapsed time: 00:00:26

channel d1: starting compressed incremental level 0 datafile backup set

channel d1: specifying datafile(s) in backup set

including current control file in backup set

channel d1: starting piece 1 at 08-sep-2013 17:43:56

channel d1: finished piece 1 at 08-sep-2013 17:44:00

piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_ncnn0_AAA_92t6gf23_.bkp tag=AAA comment=NONE

channel d1: backup set complete, elapsed time: 00:00:04

Finished backup at 08-sep-2013 17:44:00

Starting backup at 08-sep-2013 17:44:01

current log archived

channel d1: starting compressed archived log backup set

channel d1: specifying archived log(s) in backup set

input archived log thread=1 sequence=4 RECID=192 STAMP=825615845

channel d1: starting piece 1 at 08-sep-2013 17:44:07

channel d1: finished piece 1 at 08-sep-2013 17:44:11

piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6gqyh_.bkp tag=AAA comment=NONE

channel d1: backup set complete, elapsed time: 00:00:04

channel d1: deleting archived log(s)

archived log file name=/oracle/flashrecovery/LAX_DB01/archivelog/2013_09_08/o1_mf_1_4_92t6gnpg_.arc RECID=192 STAMP=825615845

Finished backup at 08-sep-2013 17:44:11

Starting Control File and SPFILE Autobackup at 08-sep-2013 17:44:12

piece handle=/oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825615853_92t6h3h6_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 08-sep-2013 17:44:27

released channel: d1

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

272     Incr 0  1.13M      DISK        00:00:07     08-sep-2013 17:29:07

        BP Key: 272   Status: AVAILABLE  Compressed: YES  Tag: DINC0_SUN

        Piece Name: /oracle/backup/DB01_1452485914_20130908_8pojbois_1_1.inc0_Sun

  Control File Included: Ckp SCN: 947424       Ckp time: 08-sep-2013 17:28:59

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

274     Full    17.08M     DISK        00:00:08     08-sep-2013 17:29:27

        BP Key: 274   Status: AVAILABLE  Compressed: NO  Tag: TAG20130908T172918

        Piece Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825614959_92t5m4rm_.bkp

  Control File Included: Ckp SCN: 947443       Ckp time: 08-sep-2013 17:29:19

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

277     Incr 0  1.13M      DISK        00:00:09     08-sep-2013 17:43:58

        BP Key: 277   Status: AVAILABLE  Compressed: YES  Tag: AAA

        Piece Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_ncnn0_AAA_92t6gf23_.bkp

  Control File Included: Ckp SCN: 947918       Ckp time: 08-sep-2013 17:43:50

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

279     Full    17.08M     DISK        00:00:08     08-sep-2013 17:44:21

        BP Key: 279   Status: AVAILABLE  Compressed: NO  Tag: TAG20130908T174412

        Piece Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825615853_92t6h3h6_.bkp

  Control File Included: Ckp SCN: 947941       Ckp time: 08-sep-2013 17:44:13

List of Datafile Backups

========================

File Key     TY LV S Ckp SCN    Ckp Time             #Pieces #Copies Compressed Tag

---- ------- -  -- - ---------- -------------------- ------- ------- ---------- ---

1    276     B  0  A 947909     08-sep-2013 17:43:22 1       1       YES        AAA

2    276     B  0  A 947909     08-sep-2013 17:43:22 1       1       YES        AAA

3    276     B  0  A 947909     08-sep-2013 17:43:22 1       1       YES        AAA

4    276     B  0  A 947909     08-sep-2013 17:43:22 1       1       YES        AAA

List of Archived Log Backups

============================

Thrd Seq     Low SCN    Low Time             BS Key  S #Pieces #Copies Compressed Tag

---- ------- ---------- -------------------- ------- - ------- ------- ---------- ---

1    3       947432     08-sep-2013 17:29:11 275     A 1       1       YES        AAA

1    4       947897     08-sep-2013 17:43:02 278     A 1       1       YES        AAA

List of Control File Backups

============================

CF Ckp SCN Ckp Time             BS Key  S #Pieces #Copies Compressed Tag

---------- -------------------- ------- - ------- ------- ---------- ---

947918     08-sep-2013 17:43:50 277     A 1       1       YES        AAA

Starting restore at 08-sep-2013 17:44:36

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=38 device type=DISK

recovery area destination: /oracle/flashrecovery

database name (or database unique name) used for search: LAX_DB01

channel ORA_DISK_1: AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825615853_92t6h3h6_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130908

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825615853_92t6h3h6_.bkp

channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete

Finished restore at 08-sep-2013 17:44:37

Starting restore at 08-sep-2013 17:44:38

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile backup set

channel ORA_DISK_1: reading from backup piece /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_ncnn0_AAA_92t6gf23_.bkp

channel ORA_DISK_1: piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_ncnn0_AAA_92t6gf23_.bkp tag=AAA

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: validation complete, elapsed time: 00:00:01

Finished restore at 08-sep-2013 17:44:39

Starting restore at 08-sep-2013 17:44:41

using channel ORA_DISK_1

recovery area destination: /oracle/flashrecovery

database name (or database unique name) used for search: LAX_DB01

channel ORA_DISK_1: AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825615853_92t6h3h6_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130908

channel ORA_DISK_1: starting validation of datafile backup set

channel ORA_DISK_1: validation complete, elapsed time: 00:00:02

Finished restore at 08-sep-2013 17:44:43

Starting restore at 08-sep-2013 17:44:44

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of datafile backup set

channel ORA_DISK_1: reading from backup piece /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_nnnd0_AAA_92t6ffwn_.bkp

channel ORA_DISK_1: piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_nnnd0_AAA_92t6ffwn_.bkp tag=AAA

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: validation complete, elapsed time: 00:00:15

Finished restore at 08-sep-2013 17:44:59

Starting restore at 08-sep-2013 17:45:01

using channel ORA_DISK_1

channel ORA_DISK_1: starting validation of archived log backup set

channel ORA_DISK_1: reading from backup piece /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6dwg7_.bkp

channel ORA_DISK_1: piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6dwg7_.bkp tag=AAA

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: validation complete, elapsed time: 00:00:00

channel ORA_DISK_1: starting validation of archived log backup set

channel ORA_DISK_1: reading from backup piece /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6gqyh_.bkp

channel ORA_DISK_1: piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6gqyh_.bkp tag=AAA

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: validation complete, elapsed time: 00:00:00

Finished restore at 08-sep-2013 17:45:01

sql statement: create tablespace junk datafile size 16m

Starting backup at 08-sep-2013 17:45:35

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=5 RECID=193 STAMP=825615937

channel ORA_DISK_1: starting piece 1 at 08-sep-2013 17:45:39

channel ORA_DISK_1: finished piece 1 at 08-sep-2013 17:45:42

piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_TAG20130908T174538_92t6kmkj_.bkp tag=TAG20130908T174538 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

channel ORA_DISK_1: deleting archived log(s)

archived log file name=/oracle/flashrecovery/LAX_DB01/archivelog/2013_09_08/o1_mf_1_5_92t6kkfp_.arc RECID=193 STAMP=825615937

Finished backup at 08-sep-2013 17:45:43

Starting backup at 08-sep-2013 17:45:44

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00003 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_undotbs_8ymzsr1w_.dbf

input datafile file number=00004 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_user_dat_8yo8879m_.dbf

input datafile file number=00001 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_system_8ymzrcgk_.dbf

input datafile file number=00002 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_sysaux_8ymzrr20_.dbf

input datafile file number=00005 name=/oracle/oradata/LAX_DB01/datafile/o1_mf_junk_92t6jfpk_.dbf

channel ORA_DISK_1: starting piece 1 at 08-sep-2013 17:45:45

channel ORA_DISK_1: finished piece 1 at 08-sep-2013 17:46:30

piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_nnndf_TAG20130908T174544_92t6kwmw_.bkp tag=TAG20130908T174544 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45

Finished backup at 08-sep-2013 17:46:30

Starting backup at 08-sep-2013 17:46:31

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=6 RECID=194 STAMP=825615994

channel ORA_DISK_1: starting piece 1 at 08-sep-2013 17:46:35

channel ORA_DISK_1: finished piece 1 at 08-sep-2013 17:46:38

piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_TAG20130908T174634_92t6mcw2_.bkp tag=TAG20130908T174634 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03

channel ORA_DISK_1: deleting archived log(s)

archived log file name=/oracle/flashrecovery/LAX_DB01/archivelog/2013_09_08/o1_mf_1_6_92t6m9w7_.arc RECID=194 STAMP=825615994

Finished backup at 08-sep-2013 17:46:39

Starting Control File and SPFILE Autobackup at 08-sep-2013 17:46:40

piece handle=/oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 08-sep-2013 17:46:55

List of Backups

===============

Key     TY LV S Device Type Completion Time      #Pieces #Copies Compressed Tag

------- -- -- - ----------- -------------------- ------- ------- ---------- ---

266     B  A  A DISK        08-sep-2013 17:27:54 1       1       YES        AINC0_SUN

268     B  0  A DISK        08-sep-2013 17:28:23 1       1       YES        DINC0_SUN

269     B  0  A DISK        08-sep-2013 17:28:26 1       1       YES        DINC0_SUN

270     B  0  A DISK        08-sep-2013 17:28:39 1       1       YES        DINC0_SUN

271     B  0  A DISK        08-sep-2013 17:28:53 1       1       YES        DINC0_SUN

272     B  0  A DISK        08-sep-2013 17:29:07 1       1       YES        DINC0_SUN

273     B  A  A DISK        08-sep-2013 17:29:14 1       1       YES        AINC0_SUN

274     B  F  A DISK        08-sep-2013 17:29:27 1       1       NO         TAG20130908T172918

275     B  A  A DISK        08-sep-2013 17:43:09 1       1       YES        AAA

276     B  0  A DISK        08-sep-2013 17:43:40 1       1       YES        AAA

277     B  0  A DISK        08-sep-2013 17:43:58 1       1       YES        AAA

278     B  A  A DISK        08-sep-2013 17:44:09 1       1       YES        AAA

279     B  F  A DISK        08-sep-2013 17:44:21 1       1       NO         TAG20130908T174412

280     B  A  A DISK        08-sep-2013 17:45:40 1       1       NO         TAG20130908T174538

281     B  F  A DISK        08-sep-2013 17:46:22 1       1       NO         TAG20130908T174544

282     B  A  A DISK        08-sep-2013 17:46:36 1       1       NO         TAG20130908T174634

283     B  F  A DISK        08-sep-2013 17:46:50 1       1       NO         TAG20130908T174640

Starting restore at 08-sep-2013 17:47:05

using channel ORA_DISK_1

recovery area destination: /oracle/flashrecovery

database name (or database unique name) used for search: LAX_DB01

channel ORA_DISK_1: AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130908

channel ORA_DISK_1: restoring spfile from AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp

channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete

Finished restore at 08-sep-2013 17:47:06

Starting restore at 08-sep-2013 17:47:07

using channel ORA_DISK_1

recovery area destination: /oracle/flashrecovery

database name (or database unique name) used for search: LAX_DB01

channel ORA_DISK_1: AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130908

channel ORA_DISK_1: starting validation of datafile backup set

channel ORA_DISK_1: validation complete, elapsed time: 00:00:03

Finished restore at 08-sep-2013 17:47:10

host command complete

released channel: ORA_DISK_1

allocated channel: d1

channel d1: SID=38 device type=DISK

startup failed: ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0.3/db_1/dbs/initdb01.ora'

starting Oracle instance without parameter file for retrieval of spfile

Oracle instance started

Total System Global Area     158662656 bytes

Fixed Size                     2226456 bytes

Variable Size                 92276456 bytes

Database Buffers              58720256 bytes

Redo Buffers                   5439488 bytes

allocated channel: d1

channel d1: SID=21 device type=DISK

executing command: SET DBID

Starting restore at 08-sep-2013 17:47:18

recovery area destination: /oracle/flashrecovery

database name (or database unique name) used for search: LAX_DB01

channel d1: AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp found in the recovery area

channel d1: looking for AUTOBACKUP on day: 20130908

channel d1: restoring spfile from AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp

channel d1: SPFILE restore from AUTOBACKUP complete

Finished restore at 08-sep-2013 17:47:20

Oracle instance started

Total System Global Area     534462464 bytes

Fixed Size                     2230072 bytes

Variable Size                276826312 bytes

Database Buffers             251658240 bytes

Redo Buffers                   3747840 bytes

allocated channel: d1

channel d1: SID=18 device type=DISK

executing command: SET DBID

Starting restore at 08-sep-2013 17:47:22

released channel: d1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 09/08/2013 17:47:22

RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP

Recovery Manager complete.

[oracle@lax:db01]/home/oracle

$

------- MANUAL RESTORE -------

[oracle@lax:db01]/home/oracle

$ rman target /

Recovery Manager: Release 11.2.0.3.0 - Production on Sun Sep 8 17:52:18 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: DB01 (not mounted)

RMAN> set dbid 1452485914

executing command: SET DBID

RMAN> restore controlfile from tag 'AAA';

Starting restore at 08-sep-2013 17:52:36

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=17 device type=DISK

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 09/08/2013 17:52:36

RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP

RMAN> restore controlfile from autobackup;

Starting restore at 08-sep-2013 17:52:43

using channel ORA_DISK_1

recovery area destination: /oracle/flashrecovery

database name (or database unique name) used for search: LAX_DB01

channel ORA_DISK_1: AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp found in the recovery area

channel ORA_DISK_1: looking for AUTOBACKUP on day: 20130908

channel ORA_DISK_1: restoring control file from AUTOBACKUP /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp

channel ORA_DISK_1: control file restore from AUTOBACKUP complete

output file name=/oracle/oradata/LAX_DB01/controlfile/o1_mf_8ymzlb9v_.ctl

output file name=/oracle/oradata/LAX_DB01/controlfile/o1_mf_8ymzlc18_.ctl

Finished restore at 08-sep-2013 17:52:46

RMAN> alter database mount;

database mounted

released channel: ORA_DISK_1

RMAN> restore database from tag 'AAA';

Starting restore at 08-sep-2013 17:53:05

Starting implicit crosscheck backup at 08-sep-2013 17:53:05

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=17 device type=DISK

Crosschecked 20 objects

Finished implicit crosscheck backup at 08-sep-2013 17:53:06

Starting implicit crosscheck copy at 08-sep-2013 17:53:06

using channel ORA_DISK_1

Finished implicit crosscheck copy at 08-sep-2013 17:53:06

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_07/o1_mf_s_825505909_92pv3b3h_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_07/o1_mf_s_825505443_92ptnrnx_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_07/o1_mf_s_825504089_92psbj4c_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825583565_92s6y2sj_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825598193_92so75ts_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825583673_92s71h73_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825598316_92soc0g8_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825591733_92sgx9ko_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825591847_92sh0vqj_.bkp

using channel ORA_DISK_1

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 09/08/2013 17:53:08

RMAN-06026: some targets not found - aborting restore

RMAN-06023: no backup or copy of datafile 5 found to restore

RMAN> list backup of controlfile;

List of Backup Sets

===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

272     Incr 0  1.13M      DISK        00:00:07     08-sep-2013 17:29:07

        BP Key: 272   Status: AVAILABLE  Compressed: YES  Tag: DINC0_SUN

        Piece Name: /oracle/backup/DB01_1452485914_20130908_8pojbois_1_1.inc0_Sun

  Control File Included: Ckp SCN: 947424       Ckp time: 08-sep-2013 17:28:59

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

274     Full    17.08M     DISK        00:00:08     08-sep-2013 17:29:27

        BP Key: 274   Status: AVAILABLE  Compressed: NO  Tag: TAG20130908T172918

        Piece Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825614959_92t5m4rm_.bkp

  Control File Included: Ckp SCN: 947443       Ckp time: 08-sep-2013 17:29:19

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

277     Incr 0  1.13M      DISK        00:00:09     08-sep-2013 17:43:58

        BP Key: 277   Status: AVAILABLE  Compressed: YES  Tag: AAA

        Piece Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_ncnn0_AAA_92t6gf23_.bkp

  Control File Included: Ckp SCN: 947918       Ckp time: 08-sep-2013 17:43:50

BS Key  Type LV Size       Device Type Elapsed Time Completion Time

------- ---- -- ---------- ----------- ------------ --------------------

279     Full    17.08M     DISK        00:00:08     08-sep-2013 17:44:21

        BP Key: 279   Status: AVAILABLE  Compressed: NO  Tag: TAG20130908T174412

        Piece Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825615853_92t6h3h6_.bkp

  Control File Included: Ckp SCN: 947941       Ckp time: 08-sep-2013 17:44:13

RMAN> startup force nomount;

Oracle instance started

Total System Global Area     534462464 bytes

Fixed Size                     2230072 bytes

Variable Size                276826312 bytes

Database Buffers             251658240 bytes

Redo Buffers                   3747840 bytes

RMAN> set dbid 1452485914

executing command: SET DBID

RMAN> restore controlfile from autobackup until scn 947941;

Starting restore at 08-sep-2013 17:56:57

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=19 device type=DISK

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 09/08/2013 17:56:57

RMAN-06493: only UNTIL TIME clause is allowed when performing a restore from AUTOBACKUP, found: SCN

RMAN> restore controlfile from '/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_ncnn0_AAA_92t6gf23_.bkp';

Starting restore at 08-sep-2013 17:57:30

using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

output file name=/oracle/oradata/LAX_DB01/controlfile/o1_mf_8ymzlb9v_.ctl

output file name=/oracle/oradata/LAX_DB01/controlfile/o1_mf_8ymzlc18_.ctl

Finished restore at 08-sep-2013 17:57:33

RMAN> alter database mount;

database mounted

released channel: ORA_DISK_1

RMAN> restore database from tag 'AAA';

Starting restore at 08-sep-2013 17:58:08

Starting implicit crosscheck backup at 08-sep-2013 17:58:08

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=19 device type=DISK

Crosschecked 14 objects

Finished implicit crosscheck backup at 08-sep-2013 17:58:08

Starting implicit crosscheck copy at 08-sep-2013 17:58:08

using channel ORA_DISK_1

Finished implicit crosscheck copy at 08-sep-2013 17:58:08

searching for all files in the recovery area

cataloging files...

cataloging done

List of Cataloged Files

=======================

File Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_TAG20130908T174634_92t6mcw2_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6gqyh_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_TAG20130908T174538_92t6kmkj_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_nnndf_TAG20130908T174544_92t6kwmw_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_ncnn0_AAA_92t6gf23_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_07/o1_mf_s_825505909_92pv3b3h_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_07/o1_mf_s_825505443_92ptnrnx_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_07/o1_mf_s_825504089_92psbj4c_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825583565_92s6y2sj_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825615853_92t6h3h6_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825598193_92so75ts_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825583673_92s71h73_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825616001_92t6mq6t_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825598316_92soc0g8_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825591733_92sgx9ko_.bkp

File Name: /oracle/flashrecovery/LAX_DB01/autobackup/2013_09_08/o1_mf_s_825591847_92sh0vqj_.bkp

using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /oracle/oradata/LAX_DB01/datafile/o1_mf_system_8ymzrcgk_.dbf

channel ORA_DISK_1: restoring datafile 00002 to /oracle/oradata/LAX_DB01/datafile/o1_mf_sysaux_8ymzrr20_.dbf

channel ORA_DISK_1: restoring datafile 00003 to /oracle/oradata/LAX_DB01/datafile/o1_mf_undotbs_8ymzsr1w_.dbf

channel ORA_DISK_1: restoring datafile 00004 to /oracle/oradata/LAX_DB01/datafile/o1_mf_user_dat_8yo8879m_.dbf

channel ORA_DISK_1: reading from backup piece /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_nnnd0_AAA_92t6ffwn_.bkp

channel ORA_DISK_1: piece handle=/oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_nnnd0_AAA_92t6ffwn_.bkp tag=AAA

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:55

Finished restore at 08-sep-2013 17:59:09

RMAN> list backup of archivelog all tag 'AAA';

List of Backup Sets

===================

BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ --------------------

275     48.00K     DISK        00:00:02     08-sep-2013 17:43:09

        BP Key: 275   Status: AVAILABLE  Compressed: YES  Tag: AAA

        Piece Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6dwg7_.bkp

  List of Archived Logs in backup set 275

  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time

  ---- ------- ---------- -------------------- ---------- ---------

  1    3       947432     08-sep-2013 17:29:11 947897     08-sep-2013 17:43:02

BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ --------------------

278     3.00K      DISK        00:00:00     08-sep-2013 17:44:07

        BP Key: 278   Status: AVAILABLE  Compressed: YES  Tag: AAA

        Piece Name: /oracle/flashrecovery/LAX_DB01/backupset/2013_09_08/o1_mf_annnn_AAA_92t6gqyh_.bkp

  List of Archived Logs in backup set 278

  Thrd Seq     Low SCN    Low Time             Next SCN   Next Time

  ---- ------- ---------- -------------------- ---------- ---------

  1    4       947897     08-sep-2013 17:43:02 947929     08-sep-2013 17:44:02

RMAN> recover database until sequence 5;

Starting recover at 08-sep-2013 17:59:49

using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 4 is already on disk as file /oracle/oradata/LAX_DB01/onlinelog/o1_mf_4_8ymzpogk_.log

archived log file name=/oracle/oradata/LAX_DB01/onlinelog/o1_mf_4_8ymzpogk_.log thread=1 sequence=4

media recovery complete, elapsed time: 00:00:02

Finished recover at 08-sep-2013 18:00:05

RMAN> alter database open resetlogs;

database opened

RMAN> exit

Recovery Manager complete.

[oracle@lax:db01]/home/oracle

$ sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Sun Sep 8 18:08:28 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

LAX:(SYS@db01)> select name from v$tablespace;

NAME

------------------------------

SYSTEM

SYSAUX

UNDOTBS

TEMP

USER_DATA

LAX:(SYS@db01)>