Tuesday, May 15, 2012

Manually creating Standby Database without auxillary database


Note: for details please refer to Doc ID 469493.1

1) Take backup of primary database in my case i have taken a compressed one.


$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri May 18 20:05:47 2012

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

connected to target database: ORCLLIVE (DBID=XXXXXXXX)

RMAN> report schema
2> ;

using target database control file instead of recovery catalog
Report of database schema for database with db_unique_name ORCLLIVE

List of Permanent Datafiles
===========================
File Size(MB) Tablespace           RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1    950      SYSTEM               ***     +DATA/ORCLLIVE/datafile/system.493.781
2    1030     SYSAUX               ***     +DATA/ORCLLIVE/datafile/sysaux.492.781
3    24800    UNDOTBS1             ***     +DATA/ORCLLIVE/datafile/undotbs1.495.7
4    5        USERS                ***     +DATA/ORCLLIVE/datafile/users.494.7813
5    17450    UNDOTBS2             ***     +DATA/ORCLLIVE/datafile/undotbs2.500.7
6    32767    T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.50
7    23096    T24DISTINDEX         ***     +DATA/ORCLLIVE/datafile/t24distindex.5
8    32767    T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.50
9    32767    T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.50
10   4096     SYSAUX               ***     +DATA/ORCLLIVE/datafile/sysaux.302.781
11   32767    T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.30
12   1024     SYSTEM               ***     +DATA/ORCLLIVE/datafile/system.305.781
13   32767    T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.35
14   32767    T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.40
15   32704    T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.39
16   4096     T24DISTDATA          ***     +DATA/ORCLLIVE/datafile/t24distdata.27

List of Temporary Files
=======================
File Size(MB) Tablespace           Maxsize(MB) Tempfile Name
---- -------- -------------------- ----------- --------------------
1    1282     TEMP                 32767       +DATA/ORCLLIVE/tempfile/temp.499.7

RMAN> run {
2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> allocate channel c3 type disk;
5> backup as compressed backupset database format '/u02/backup/rman/Primary_bkp_standby_%U';
6> backup as compressed backupset archivelog all format '/u02/backup/rman/Primary_bkp_standby_%U.arc';
7> }

allocated channel: c1
channel c1: SID=5970 instance=ORCLLIVE1 device type=DISK

allocated channel: c2
channel c2: SID=7232 instance=ORCLLIVE1 device type=DISK

allocated channel: c3
channel c3: SID=632 instance=ORCLLIVE1 device type=DISK

Starting backup at 05/18/12 20:08:18
channel c1: starting compressed full datafile backup set
channel c1: specifying datafile(s) in backup set
input datafile file number=00006 name=+DATA/ORCLLIVE/datafile/t24distdata.504.781389949
input datafile file number=00011 name=+DATA/ORCLLIVE/datafile/t24distdata.309.781739411
input datafile file number=00015 name=+DATA/ORCLLIVE/datafile/t24distdata.395.782432771
input datafile file number=00005 name=+DATA/ORCLLIVE/datafile/undotbs2.500.781389443
channel c1: starting piece 1 at 05/18/12 20:08:19
channel c2: starting compressed full datafile backup set
channel c2: specifying datafile(s) in backup set
input datafile file number=00008 name=+DATA/ORCLLIVE/datafile/t24distdata.506.781574987
input datafile file number=00013 name=+DATA/ORCLLIVE/datafile/t24distdata.355.781804141
input datafile file number=00003 name=+DATA/ORCLLIVE/datafile/undotbs1.495.781389155
input datafile file number=00016 name=+DATA/ORCLLIVE/datafile/t24distdata.273.782953715
input datafile file number=00001 name=+DATA/ORCLLIVE/datafile/system.493.781389153
input datafile file number=00004 name=+DATA/ORCLLIVE/datafile/users.494.781389155
channel c2: starting piece 1 at 05/18/12 20:08:19
channel c3: starting compressed full datafile backup set
channel c3: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/ORCLLIVE/datafile/t24distdata.507.781648603
input datafile file number=00014 name=+DATA/ORCLLIVE/datafile/t24distdata.403.782189783
input datafile file number=00007 name=+DATA/ORCLLIVE/datafile/t24distindex.505.781390005
input datafile file number=00010 name=+DATA/ORCLLIVE/datafile/sysaux.302.781737219
input datafile file number=00002 name=+DATA/ORCLLIVE/datafile/sysaux.492.781389155
input datafile file number=00012 name=+DATA/ORCLLIVE/datafile/system.305.781781913
channel c3: starting piece 1 at 05/18/12 20:08:19
backup as compressed backupset archivelog all format '/u02/backup/rman/Primary_bkp_standby_%U.arc';channel c2: finished piece 1 at 05/18/12 20:40:15
piece handle=/u02/backup/rman/Primary_bkp_standby_4jnbajlj_1_1 tag=TAG20120518T200818 comment=NONE
channel c2: backup set complete, elapsed time: 00:31:56
channel c1: finished piece 1 at 05/18/12 20:40:55
piece handle=/u02/backup/rman/Primary_bkp_standby_4inbajli_1_1 tag=TAG20120518T200818 comment=NONE
channel c1: backup set complete, elapsed time: 00:32:36
channel c3: finished piece 1 at 05/18/12 20:48:55
piece handle=/u02/backup/rman/Primary_bkp_standby_4knbajlj_1_1 tag=TAG20120518T200818 comment=NONE
channel c3: backup set complete, elapsed time: 00:40:36
Finished backup at 05/18/12 20:48:55

Starting backup at 05/18/12 20:48:56
current log archived
channel c1: starting compressed archived log backup set
channel c1: specifying archived log(s) in backup set
input archived log thread=1 sequence=761 RECID=1370 STAMP=783595072
input archived log thread=2 sequence=610 RECID=1371 STAMP=783595494
input archived log thread=1 sequence=762 RECID=1372 STAMP=783599053
input archived log thread=2 sequence=611 RECID=1373 STAMP=783599537
input archived log thread=1 sequence=763 RECID=1374 STAMP=783601882
input archived log thread=2 sequence=612 RECID=1375 STAMP=783602044
input archived log thread=1 sequence=764 RECID=1376 STAMP=783604598
channel c1: starting piece 1 at 05/18/12 20:49:18
channel c2: starting compressed archived log backup set
channel c2: specifying archived log(s) in backup set
input archived log thread=2 sequence=613 RECID=1377 STAMP=783605887
input archived log thread=1 sequence=765 RECID=1378 STAMP=783608647
input archived log thread=2 sequence=614 RECID=1379 STAMP=783611922
input archived log thread=1 sequence=766 RECID=1380 STAMP=783612898
input archived log thread=2 sequence=615 RECID=1381 STAMP=783614063
input archived log thread=1 sequence=767 RECID=1382 STAMP=783616274
input archived log thread=2 sequence=616 RECID=1383 STAMP=783616766
channel c2: starting piece 1 at 05/18/12 20:49:18
channel c3: starting compressed archived log backup set
channel c3: specifying archived log(s) in backup set
input archived log thread=1 sequence=768 RECID=1384 STAMP=783619605
input archived log thread=2 sequence=617 RECID=1385 STAMP=783619918
input archived log thread=1 sequence=769 RECID=1386 STAMP=783623487
input archived log thread=2 sequence=618 RECID=1387 STAMP=783623742
input archived log thread=1 sequence=770 RECID=1388 STAMP=783636553
input archived log thread=2 sequence=619 RECID=1389 STAMP=783636555
channel c3: starting piece 1 at 05/18/12 20:49:18
channel c3: finished piece 1 at 05/18/12 20:57:33
piece handle=/u02/backup/rman/Primary_bkp_standby_4nnbam2e_1_1.arc tag=TAG20120518T204917 comment=NONE
channel c3: backup set complete, elapsed time: 00:08:15
channel c1: finished piece 1 at 05/18/12 20:59:03
piece handle=/u02/backup/rman/Primary_bkp_standby_4lnbam2e_1_1.arc tag=TAG20120518T204917 comment=NONE
channel c1: backup set complete, elapsed time: 00:09:45
channel c2: finished piece 1 at 05/18/12 20:59:13
piece handle=/u02/backup/rman/Primary_bkp_standby_4mnbam2e_1_1.arc tag=TAG20120518T204917 comment=NONE
channel c2: backup set complete, elapsed time: 00:09:55
Finished backup at 05/18/12 20:59:13

Starting Control File and SPFILE Autobackup at 05/18/12 20:59:13
piece handle=+ARCHIVE/ORCLLIVE/backup/c-XXXXXXXX-20120518-01 comment=NONE
Finished Control File and SPFILE Autobackup at 05/18/12 20:59:14
released channel: c1
released channel: c2
released channel: c3

RMAN> run {
2> allocate channel c1 type disk format '/u02/backup/rman/Primary_bkp_standby_%U';
3> backup current controlfile for standby;
4> }

released channel: ORA_DISK_1
allocated channel: c1
channel c1: SID=5970 instance=ORCLLIVE1 device type=DISK

Starting backup at 05/18/12 21:04:14
channel c1: starting full datafile backup set
channel c1: specifying datafile(s) in backup set
including standby control file in backup set
channel c1: starting piece 1 at 05/18/12 21:04:15
channel c1: finished piece 1 at 05/18/12 21:04:16
piece handle=/u02/backup/rman/Primary_bkp_standby_4qnbamue_1_1 tag=TAG20120518T210414 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 05/18/12 21:04:16

Starting Control File and SPFILE Autobackup at 05/18/12 21:04:16
piece handle=+ARCHIVE/ORCLLIVE/backup/c-XXXXXXXX-20120518-02 comment=NONE
Finished Control File and SPFILE Autobackup at 05/18/12 21:04:17
released channel: c1

RMAN> exit


Recovery Manager complete.
$ ls -ltr
total 0
-rw-r-----    1 oracle   asmadmin 7834181632 May 18 20:40 Primary_bkp_standby_4jnbajlj_1_1
-rw-r-----    1 oracle   asmadmin 7977918464 May 18 20:40 Primary_bkp_standby_4inbajli_1_1
-rw-r-----    1 oracle   asmadmin 10228621312 May 18 20:48 Primary_bkp_standby_4knbajlj_1_1
-rw-r-----    1 oracle   asmadmin 3398466560 May 18 20:57 Primary_bkp_standby_4nnbam2e_1_1.arc
-rw-r-----    1 oracle   asmadmin 4068699648 May 18 20:59 Primary_bkp_standby_4lnbam2e_1_1.arc
-rw-r-----    1 oracle   asmadmin 4140691968 May 18 20:59 Primary_bkp_standby_4mnbam2e_1_1.arc
-rw-r-----    1 oracle   asmadmin   18087936 May 18 21:04 Primary_bkp_standby_4qnbamue_1_1
$ hostanem
ksh: hostanem:  not found.
$ hostname

2)SCP the backup files to standby server


$ scp Primary_bkp_standby_* oracle@10.3.8.15:/u02/backup/rman/
oracle@10.3.8.15's password:
Primary_bkp_standby_4inbajli_1_1                                                                                           100% 7608MB  26.5MB/s   04:47
Primary_bkp_standby_4jnbajlj_1_1                                                                                           100% 7471MB  26.7MB/s   04:40
Primary_bkp_standby_4knbajlj_1_1                                                                                           100% 9755MB  23.7MB/s   06:51
Primary_bkp_standby_4lnbam2e_1_1.arc                                                                                       100% 3880MB  24.6MB/s   02:38
Primary_bkp_standby_4mnbam2e_1_1.arc                                                                                       100% 3949MB  25.6MB/s   02:34
Primary_bkp_standby_4nnbam2e_1_1.arc                                                                                       100% 3241MB  24.6MB/s   02:12
Primary_bkp_standby_4qnbamue_1_1



1) Modify the standby parameter file and start standby DB in nomount state
$ ps -fe|grep pmon
    grid  4063456        1   0   Apr 25      -  1:56 asm_pmon_+ASM
  oracle  5242980        1   0 10:13:42      -  0:02 ora_pmon_ORCLLIVESBY
  oracle  7602180        1   0 18:08:57      -  0:00 ora_pmon_LIVEORCLSBY
$ echo $ORACLE_SID
LIVEORCLSBY

$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Tue May 15 18:29:43 2012

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

connected to target database: LIVEORCL (not mounted)

RMAN> set dbid=2649139521

executing command: SET DBID

RMAN> restore standby controlfile from '/u02/backup/rman/Primary_bkp_standby_0hnb2gli_1_1';

Starting restore at 15-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5671 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=+DATA/LIVEORCLsby/controlfile/control01.ctl
output file name=+ARCHIVE/LIVEORCLsby/controlfile/control02.ctl
Finished restore at 15-MAY-12

RMAN> sql 'alter database mount standby database';

sql statement: alter database mount standby database
released channel: ORA_DISK_1

RMAN> restore database;

Starting restore at 15-MAY-12
Starting implicit crosscheck backup at 15-MAY-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=7183 device type=DISK
Crosschecked 16 objects
Finished implicit crosscheck backup at 15-MAY-12

Starting implicit crosscheck copy at 15-MAY-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 15-MAY-12

searching for all files in the recovery area
cataloging files...
no files cataloged

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 00002 to +DATA/LIVEORCLsby/datafile/sysaux.306.781894957
channel ORA_DISK_1: restoring datafile 00008 to +DATA/LIVEORCLsby/datafile/t24distdata.397.782095887
channel ORA_DISK_1: restoring datafile 00009 to +DATA/LIVEORCLsby/datafile/t24distdata.400.782095905
channel ORA_DISK_1: restoring datafile 00011 to +DATA/LIVEORCLsby/datafile/t24distdata.398.782096151
channel ORA_DISK_1: reading from backup piece /u02/backup/rman/Primary_bkp_standby_0anb2f5t_1_1
channel ORA_DISK_1: piece handle=/u02/backup/rman/Primary_bkp_standby_0anb2f5t_1_1 tag=TAG20120515T180236
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:05:55
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 +DATA/LIVEORCLsby/datafile/system.312.781894955
channel ORA_DISK_1: restoring datafile 00003 to +DATA/LIVEORCLsby/datafile/undotbs1.301.781894957
channel ORA_DISK_1: restoring datafile 00007 to +DATA/LIVEORCLsby/datafile/t24distindex.446.781895581
channel ORA_DISK_1: restoring datafile 00010 to +DATA/LIVEORCLsby/datafile/t24distdata.396.782095937
channel ORA_DISK_1: reading from backup piece /u02/backup/rman/Primary_bkp_standby_0bnb2f5t_1_1
channel ORA_DISK_1: piece handle=/u02/backup/rman/Primary_bkp_standby_0bnb2f5t_1_1 tag=TAG20120515T180236
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:06:05
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 00004 to +DATA/LIVEORCLsby/datafile/users.300.781894957
channel ORA_DISK_1: restoring datafile 00005 to +DATA/LIVEORCLsby/datafile/undotbs2.408.781895217
channel ORA_DISK_1: restoring datafile 00006 to +DATA/LIVEORCLsby/datafile/t24distdata.406.781895523
channel ORA_DISK_1: reading from backup piece /u02/backup/rman/Primary_bkp_standby_09nb2f5t_1_1
channel ORA_DISK_1: piece handle=/u02/backup/rman/Primary_bkp_standby_09nb2f5t_1_1 tag=TAG20120515T180236
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:13:16
Finished restore at 15-MAY-12

RMAN> list backup of archivelog all;


List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
6       732.31M    DISK        00:02:01     15-MAY-12
        BP Key: 6   Status: EXPIRED  Compressed: YES  Tag: TAG20120515T173105
        Piece Name: /u02/backup/rman/Primary_bkp_standby_08nb2dap_1_1.arc

  List of Archived Logs in backup set 6
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    78      52466833   15-MAY-12 53677900   15-MAY-12
  1    79      53677900   15-MAY-12 54503144   15-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
7       1.27G      DISK        00:03:29     15-MAY-12
        BP Key: 7   Status: EXPIRED  Compressed: YES  Tag: TAG20120515T173105
        Piece Name: /u02/backup/rman/Primary_bkp_standby_07nb2dap_1_1.arc

  List of Archived Logs in backup set 7
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    75      49006110   15-MAY-12 50147864   15-MAY-12
  1    76      50147864   15-MAY-12 51315589   15-MAY-12
  1    77      51315589   15-MAY-12 52466833   15-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
8       1.28G      DISK        00:03:30     15-MAY-12
        BP Key: 8   Status: EXPIRED  Compressed: YES  Tag: TAG20120515T173105
        Piece Name: /u02/backup/rman/Primary_bkp_standby_06nb2dap_1_1.arc

  List of Archived Logs in backup set 8
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    72      45447595   14-MAY-12 46666639   14-MAY-12
  1    73      46666639   14-MAY-12 47839944   14-MAY-12
  1    74      47839944   14-MAY-12 49006110   15-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
14      818.80M    DISK        00:02:02     15-MAY-12
        BP Key: 14   Status: AVAILABLE  Compressed: YES  Tag: TAG20120515T181054
        Piece Name: /u02/backup/rman/Primary_bkp_standby_0gnb2flf_1_1.arc

  List of Archived Logs in backup set 14
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    78      52466833   15-MAY-12 53677900   15-MAY-12
  1    79      53677900   15-MAY-12 54503144   15-MAY-12
  1    80      54503144   15-MAY-12 54736952   15-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
15      1.27G      DISK        00:03:15     15-MAY-12
        BP Key: 15   Status: AVAILABLE  Compressed: YES  Tag: TAG20120515T181054
        Piece Name: /u02/backup/rman/Primary_bkp_standby_0fnb2flf_1_1.arc

  List of Archived Logs in backup set 15
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    75      49006110   15-MAY-12 50147864   15-MAY-12
  1    76      50147864   15-MAY-12 51315589   15-MAY-12
  1    77      51315589   15-MAY-12 52466833   15-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
16      1.28G      DISK        00:03:15     15-MAY-12
        BP Key: 16   Status: AVAILABLE  Compressed: YES  Tag: TAG20120515T181054
        Piece Name: /u02/backup/rman/Primary_bkp_standby_0enb2flf_1_1.arc

  List of Archived Logs in backup set 16
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    72      45447595   14-MAY-12 46666639   14-MAY-12
  1    73      46666639   14-MAY-12 47839944   14-MAY-12
  1    74      47839944   14-MAY-12 49006110   15-MAY-12

RMAN> recover database until sequence 81;

Starting recover at 15-MAY-12
using channel ORA_DISK_1

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=80
channel ORA_DISK_1: reading from backup piece /u02/backup/rman/Primary_bkp_standby_0gnb2flf_1_1.arc
channel ORA_DISK_1: piece handle=/u02/backup/rman/Primary_bkp_standby_0gnb2flf_1_1.arc tag=TAG20120515T181054
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:55
archived log file name=+ARCHIVE/LIVEORCLsby/archivelog/2012_05_15/thread_1_seq_80.937.783370839 thread=1 sequence=80
channel default: deleting archived log(s)
archived log file name=+ARCHIVE/LIVEORCLsby/archivelog/2012_05_15/thread_1_seq_80.937.783370839 RECID=1 STAMP=783370893
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/15/2012 19:01:37
RMAN-11003: failure during parse/execution of SQL statement: alter database recover cancel
ORA-10879: error signaled in parallel recovery slave
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+DATA/LIVEORCLsby/datafile/system.318.783369549'

RMAN> exit
<no need to worry about the above error it is usual>

****************************
I have again posting the screen shot from a second work done
****************************


$ hostname
dt24db1
$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri May 18 21:50:48 2012

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

connected to target database: ORCLLIVE (not mounted)

RMAN> set dbid=XXXXXXXX;

executing command: SET DBID

RMAN> restore standby controlfile from '/u02/backup/rman/Primary_bkp_standby_4qnbamue_1_1';

Starting restore at 18-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5671 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=+DATA/ORCLLIVEsby/controlfile/control01.ctl
output file name=+ARCHIVE/ORCLLIVEsby/controlfile/control02.ctl
Finished restore at 18-MAY-12

RMAN> sql 'alter database mount standby database';

sql statement: alter database mount standby database
released channel: ORA_DISK_1

RMAN> run {
2> allocate channel c1 type disk;
3> allocate channel c2 type disk;
4> allocate channel c3 type disk;
5> restore database;
6> }

allocated channel: c1
channel c1: SID=5671 device type=DISK

allocated channel: c2
channel c2: SID=7372 device type=DISK

allocated channel: c3
channel c3: SID=1 device type=DISK

Starting restore at 18-MAY-12
Starting implicit crosscheck backup at 18-MAY-12
Crosschecked 6 objects
Crosschecked 4 objects
Finished implicit crosscheck backup at 18-MAY-12

Starting implicit crosscheck copy at 18-MAY-12
Finished implicit crosscheck copy at 18-MAY-12

searching for all files in the recovery area
cataloging files...
no files cataloged


channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to +DATA/ORCLLIVEsby/datafile/system.493.781389153
channel c1: restoring datafile 00003 to +DATA/ORCLLIVEsby/datafile/undotbs1.495.781389155
channel c1: restoring datafile 00004 to +DATA/ORCLLIVEsby/datafile/users.494.781389155
channel c1: restoring datafile 00008 to +DATA/ORCLLIVEsby/datafile/t24distdata.506.781574987
channel c1: restoring datafile 00013 to +DATA/ORCLLIVEsby/datafile/t24distdata.355.781804141
channel c1: restoring datafile 00016 to +DATA/ORCLLIVEsby/datafile/t24distdata.273.782953715
channel c1: reading from backup piece /u02/backup/rman/Primary_bkp_standby_4jnbajlj_1_1
channel c2: starting datafile backup set restore
channel c2: specifying datafile(s) to restore from backup set
channel c2: restoring datafile 00005 to +DATA/ORCLLIVEsby/datafile/undotbs2.500.781389443
channel c2: restoring datafile 00006 to +DATA/ORCLLIVEsby/datafile/t24distdata.504.781389949
channel c2: restoring datafile 00011 to +DATA/ORCLLIVEsby/datafile/t24distdata.309.781739411
channel c2: restoring datafile 00015 to +DATA/ORCLLIVEsby/datafile/t24distdata.395.782432771
channel c2: reading from backup piece /u02/backup/rman/Primary_bkp_standby_4inbajli_1_1
channel c3: starting datafile backup set restore
channel c3: specifying datafile(s) to restore from backup set
channel c3: restoring datafile 00002 to +DATA/ORCLLIVEsby/datafile/sysaux.492.781389155
channel c3: restoring datafile 00007 to +DATA/ORCLLIVEsby/datafile/t24distindex.505.781390005
channel c3: restoring datafile 00009 to +DATA/ORCLLIVEsby/datafile/t24distdata.507.781648603
channel c3: restoring datafile 00010 to +DATA/ORCLLIVEsby/datafile/sysaux.302.781737219
channel c3: restoring datafile 00012 to +DATA/ORCLLIVEsby/datafile/system.305.781781913
channel c3: restoring datafile 00014 to +DATA/ORCLLIVEsby/datafile/t24distdata.403.782189783
channel c3: reading from backup piece /u02/backup/rman/Primary_bkp_standby_4knbajlj_1_1
channel c1: piece handle=/u02/backup/rman/Primary_bkp_standby_4jnbajlj_1_1 tag=TAG20120518T200818
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:53:17
channel c2: piece handle=/u02/backup/rman/Primary_bkp_standby_4inbajli_1_1 tag=TAG20120518T200818
channel c2: restored backup piece 1
channel c2: restore complete, elapsed time: 00:56:17
channel c3: piece handle=/u02/backup/rman/Primary_bkp_standby_4knbajlj_1_1 tag=TAG20120518T200818
channel c3: restored backup piece 1
channel c3: restore complete, elapsed time: 01:02:57
Finished restore at 18-MAY-12
released channel: c1
released channel: c2
released channel: c3

RMAN> list backup of archivelog all;


List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
34      27.55G     SBT_TAPE    00:05:39     02-MAY-12
        BP Key: 34   Status: AVAILABLE  Compressed: NO  Tag: TAG20120502T224856
        Handle: 13na0n2o_1_1   Media: 209

  List of Archived Logs in backup set 34
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    232     347453695  02-MAY-12 349840006  02-MAY-12
  1    233     349840006  02-MAY-12 352147840  02-MAY-12
  1    234     352147840  02-MAY-12 354522775  02-MAY-12
  1    235     354522775  02-MAY-12 356649490  02-MAY-12
  1    236     356649490  02-MAY-12 358982367  02-MAY-12
  1    237     358982367  02-MAY-12 360619613  02-MAY-12
  2    180     341007633  02-MAY-12 343699472  02-MAY-12
  2    181     343699472  02-MAY-12 346154653  02-MAY-12
  2    182     346154653  02-MAY-12 348277162  02-MAY-12
  2    183     348277162  02-MAY-12 349868949  02-MAY-12
  2    184     349868949  02-MAY-12 351608063  02-MAY-12
  2    185     351608063  02-MAY-12 353305961  02-MAY-12
  2    186     353305961  02-MAY-12 355212888  02-MAY-12
  2    187     355212888  02-MAY-12 357174576  02-MAY-12
  2    188     357174576  02-MAY-12 359484407  02-MAY-12
  2    189     359484407  02-MAY-12 360619681  02-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
39      17.30G     SBT_TAPE    00:03:42     03-MAY-12
        BP Key: 39   Status: AVAILABLE  Compressed: NO  Tag: TAG20120503T073135
        Handle: 18na1lmo_1_1   Media: 206

  List of Archived Logs in backup set 39
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    248     382004487  03-MAY-12 385618656  03-MAY-12
  1    249     385618656  03-MAY-12 389092866  03-MAY-12
  1    250     389092866  03-MAY-12 390901773  03-MAY-12
  1    251     390901773  03-MAY-12 392106567  03-MAY-12
  1    252     392106567  03-MAY-12 394277116  03-MAY-12
  2    200     382632521  03-MAY-12 385790796  03-MAY-12
  2    201     385790796  03-MAY-12 389131231  03-MAY-12
  2    202     389131231  03-MAY-12 391229549  03-MAY-12
  2    203     391229549  03-MAY-12 392263438  03-MAY-12
  2    204     392263438  03-MAY-12 394277204  03-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
48      26.48G     SBT_TAPE    00:05:12     04-MAY-12
        BP Key: 48   Status: AVAILABLE  Compressed: NO  Tag: TAG20120504T002512
        Handle: 1hna3h38_1_1   Media: 211

  List of Archived Logs in backup set 48
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    295     440453648  03-MAY-12 441267232  03-MAY-12
  1    296     441267232  03-MAY-12 442089839  03-MAY-12
  1    297     442089839  03-MAY-12 442788833  03-MAY-12
  1    298     442788833  03-MAY-12 443397843  03-MAY-12
  1    299     443397843  03-MAY-12 445617628  03-MAY-12
  1    300     445617628  03-MAY-12 446626870  03-MAY-12
  1    301     446626870  03-MAY-12 446948934  03-MAY-12
  1    302     446948934  03-MAY-12 447225114  04-MAY-12
  1    303     447225114  04-MAY-12 447322610  04-MAY-12
  2    225     438489108  03-MAY-12 439596911  03-MAY-12
  2    226     439596911  03-MAY-12 440908374  03-MAY-12
  2    227     440908374  03-MAY-12 441780266  03-MAY-12
  2    228     441780266  03-MAY-12 442419386  03-MAY-12
  2    229     442419386  03-MAY-12 445619229  03-MAY-12
  2    230     445619229  03-MAY-12 447103564  03-MAY-12
  2    231     447103564  03-MAY-12 447322623  04-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
53      22.84G     SBT_TAPE    00:04:37     04-MAY-12
        BP Key: 53   Status: AVAILABLE  Compressed: NO  Tag: TAG20120504T072953
        Handle: 1mna49vi_1_1   Media: 212

  List of Archived Logs in backup set 53
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    316     463886735  04-MAY-12 464972042  04-MAY-12
  1    317     464972042  04-MAY-12 465825713  04-MAY-12
  1    318     465825713  04-MAY-12 466560543  04-MAY-12
  1    319     466560543  04-MAY-12 467819412  04-MAY-12
  1    320     467819412  04-MAY-12 468533396  04-MAY-12
  1    321     468533396  04-MAY-12 469232219  04-MAY-12
  1    322     469232219  04-MAY-12 470084951  04-MAY-12
  1    323     470084951  04-MAY-12 470379280  04-MAY-12
  2    239     459125778  04-MAY-12 461806664  04-MAY-12
  2    240     461806664  04-MAY-12 463462443  04-MAY-12
  2    241     463462443  04-MAY-12 464624101  04-MAY-12
  2    242     464624101  04-MAY-12 466089220  04-MAY-12
  2    243     466089220  04-MAY-12 468533538  04-MAY-12
  2    244     468533538  04-MAY-12 470380609  04-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
61      20.46G     SBT_TAPE    00:04:34     04-MAY-12
        BP Key: 61   Status: AVAILABLE  Compressed: NO  Tag: TAG20120504T232133
        Handle: 1una61nt_1_1   Media: 205

  List of Archived Logs in backup set 61
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    351     527853272  04-MAY-12 529849000  04-MAY-12
  1    352     529849000  04-MAY-12 531983208  04-MAY-12
  1    353     531983208  04-MAY-12 534051392  04-MAY-12
  1    354     534051392  04-MAY-12 536099513  04-MAY-12
  1    355     536099513  04-MAY-12 544388703  04-MAY-12
  1    356     544388703  04-MAY-12 547487452  04-MAY-12
  2    267     528236442  04-MAY-12 530696797  04-MAY-12
  2    268     530696797  04-MAY-12 532728435  04-MAY-12
  2    269     532728435  04-MAY-12 534615657  04-MAY-12
  2    270     534615657  04-MAY-12 536431221  04-MAY-12
  2    271     536431221  04-MAY-12 543453851  04-MAY-12
  2    272     543453851  04-MAY-12 547488572  04-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
66      4.12G      SBT_TAPE    00:00:55     05-MAY-12
        BP Key: 66   Status: AVAILABLE  Compressed: NO  Tag: TAG20120505T002311
        Handle: 23na65bg_1_1   Media: 206

  List of Archived Logs in backup set 66
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    357     547487452  04-MAY-12 550541685  05-MAY-12
  1    358     550541685  05-MAY-12 551017462  05-MAY-12
  2    273     547488572  04-MAY-12 550468509  05-MAY-12
  2    274     550468509  05-MAY-12 551018331  05-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
71      32.46G     SBT_TAPE    00:06:40     05-MAY-12
        BP Key: 71   Status: AVAILABLE  Compressed: NO  Tag: TAG20120505T200527
        Handle: 29na8ak7_1_1   Media: 207

  List of Archived Logs in backup set 71
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    383     600928779  05-MAY-12 604024698  05-MAY-12
  1    384     604024698  05-MAY-12 605967686  05-MAY-12
  1    385     605967686  05-MAY-12 607585079  05-MAY-12
  1    386     607585079  05-MAY-12 609187135  05-MAY-12
  1    387     609187135  05-MAY-12 610689662  05-MAY-12
  1    388     610689662  05-MAY-12 611956659  05-MAY-12
  1    389     611956659  05-MAY-12 612800460  05-MAY-12
  1    390     612800460  05-MAY-12 613506150  05-MAY-12
  1    391     613506150  05-MAY-12 614093553  05-MAY-12
  1    392     614093553  05-MAY-12 614512382  05-MAY-12
  1    393     614512382  05-MAY-12 614637808  05-MAY-12
  2    297     598428679  05-MAY-12 600425981  05-MAY-12
  2    298     600425981  05-MAY-12 602488063  05-MAY-12
  2    299     602488063  05-MAY-12 604544904  05-MAY-12
  2    300     604544904  05-MAY-12 606854004  05-MAY-12
  2    301     606854004  05-MAY-12 608877969  05-MAY-12
  2    302     608877969  05-MAY-12 610976974  05-MAY-12
  2    303     610976974  05-MAY-12 612925256  05-MAY-12
  2    304     612925256  05-MAY-12 614094064  05-MAY-12
  2    305     614094064  05-MAY-12 614638048  05-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
94      91.39G     SBT_TAPE    00:17:11     10-MAY-12
        BP Key: 94   Status: AVAILABLE  Compressed: NO  Tag: TAG20120510T222120
        Handle: 32nalof2_1_1   Media: 205

  List of Archived Logs in backup set 94
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    563     884919191  09-MAY-12 887804259  10-MAY-12
  1    564     887804259  10-MAY-12 890701287  10-MAY-12
  1    565     890701287  10-MAY-12 893635710  10-MAY-12
  1    566     893635710  10-MAY-12 895934907  10-MAY-12
  1    567     895934907  10-MAY-12 897735127  10-MAY-12
  1    568     897735127  10-MAY-12 899767113  10-MAY-12
  1    569     899767113  10-MAY-12 902004038  10-MAY-12
  1    570     902004038  10-MAY-12 904592482  10-MAY-12
  1    571     904592482  10-MAY-12 905136126  10-MAY-12
  1    572     905136126  10-MAY-12 905764585  10-MAY-12
  1    573     905764585  10-MAY-12 906379804  10-MAY-12
  1    574     906379804  10-MAY-12 907041837  10-MAY-12
  1    575     907041837  10-MAY-12 907711724  10-MAY-12
  1    576     907711724  10-MAY-12 909096461  10-MAY-12
  1    577     909096461  10-MAY-12 911944526  10-MAY-12
  1    578     911944526  10-MAY-12 912693054  10-MAY-12
  1    579     912693054  10-MAY-12 913160254  10-MAY-12
  1    580     913160254  10-MAY-12 913666126  10-MAY-12
  1    581     913666126  10-MAY-12 914211095  10-MAY-12
  1    582     914211095  10-MAY-12 914782901  10-MAY-12
  1    583     914782901  10-MAY-12 916831437  10-MAY-12
  1    584     916831437  10-MAY-12 919002316  10-MAY-12
  1    585     919002316  10-MAY-12 920601060  10-MAY-12
  1    586     920601060  10-MAY-12 924118328  10-MAY-12
  1    587     924118328  10-MAY-12 927555190  10-MAY-12
  1    588     927555190  10-MAY-12 931059131  10-MAY-12
  1    589     931059131  10-MAY-12 934436054  10-MAY-12
  1    590     934436054  10-MAY-12 935770866  10-MAY-12
  2    425     884922271  09-MAY-12 888728620  10-MAY-12
  2    426     888728620  10-MAY-12 892355354  10-MAY-12
  2    427     892355354  10-MAY-12 895689350  10-MAY-12
  2    428     895689350  10-MAY-12 897867259  10-MAY-12
  2    429     897867259  10-MAY-12 900434925  10-MAY-12
  2    430     900434925  10-MAY-12 903957658  10-MAY-12
  2    431     903957658  10-MAY-12 904878659  10-MAY-12
  2    432     904878659  10-MAY-12 905518165  10-MAY-12
  2    433     905518165  10-MAY-12 906171636  10-MAY-12
  2    434     906171636  10-MAY-12 906856901  10-MAY-12
  2    435     906856901  10-MAY-12 907559152  10-MAY-12
  2    436     907559152  10-MAY-12 908894686  10-MAY-12
  2    437     908894686  10-MAY-12 912432483  10-MAY-12
  2    438     912432483  10-MAY-12 912903612  10-MAY-12
  2    439     912903612  10-MAY-12 913419718  10-MAY-12
  2    440     913419718  10-MAY-12 913942777  10-MAY-12
  2    441     913942777  10-MAY-12 914455684  10-MAY-12
  2    442     914455684  10-MAY-12 914945915  10-MAY-12
  2    443     914945915  10-MAY-12 917791991  10-MAY-12
  2    444     917791991  10-MAY-12 919369785  10-MAY-12
  2    445     919369785  10-MAY-12 923038104  10-MAY-12
  2    446     923038104  10-MAY-12 929593324  10-MAY-12
  2    447     929593324  10-MAY-12 935772920  10-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
95      87.85G     SBT_TAPE    00:16:18     10-MAY-12
        BP Key: 95   Status: AVAILABLE  Compressed: NO  Tag: TAG20120510T222120
        Handle: 33nalpgl_1_1   Media: 213

  List of Archived Logs in backup set 95
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    591     935770866  10-MAY-12 938598571  10-MAY-12
  1    592     938598571  10-MAY-12 942530629  10-MAY-12
  1    593     942530629  10-MAY-12 946615068  10-MAY-12
  1    594     946615068  10-MAY-12 951348580  10-MAY-12
  1    595     951348580  10-MAY-12 955853202  10-MAY-12
  1    596     955853202  10-MAY-12 960169405  10-MAY-12
  1    597     960169405  10-MAY-12 964627994  10-MAY-12
  1    598     964627994  10-MAY-12 969304310  10-MAY-12
  1    599     969304310  10-MAY-12 974500207  10-MAY-12
  1    600     974500207  10-MAY-12 979706391  10-MAY-12
  1    601     979706391  10-MAY-12 983423731  10-MAY-12
  1    602     983423731  10-MAY-12 987260882  10-MAY-12
  1    603     987260882  10-MAY-12 991371531  10-MAY-12
  1    604     991371531  10-MAY-12 996153593  10-MAY-12
  1    605     996153593  10-MAY-12 1001043776 10-MAY-12
  1    606     1001043776 10-MAY-12 1005915212 10-MAY-12
  1    607     1005915212 10-MAY-12 1010775787 10-MAY-12
  1    608     1010775787 10-MAY-12 1015585911 10-MAY-12
  1    609     1015585911 10-MAY-12 1019803070 10-MAY-12
  1    610     1019803070 10-MAY-12 1025755568 10-MAY-12
  1    611     1025755568 10-MAY-12 1026952827 10-MAY-12
  1    612     1026952827 10-MAY-12 1027254180 10-MAY-12
  2    448     935772920  10-MAY-12 941320312  10-MAY-12
  2    449     941320312  10-MAY-12 945546813  10-MAY-12
  2    450     945546813  10-MAY-12 949345592  10-MAY-12
  2    451     949345592  10-MAY-12 953028704  10-MAY-12
  2    452     953028704  10-MAY-12 956764475  10-MAY-12
  2    453     956764475  10-MAY-12 960471774  10-MAY-12
  2    454     960471774  10-MAY-12 964192897  10-MAY-12
  2    455     964192897  10-MAY-12 967635227  10-MAY-12
  2    456     967635227  10-MAY-12 970648810  10-MAY-12
  2    457     970648810  10-MAY-12 973713500  10-MAY-12
  2    458     973713500  10-MAY-12 976733107  10-MAY-12
  2    459     976733107  10-MAY-12 979848952  10-MAY-12
  2    460     979848952  10-MAY-12 983354839  10-MAY-12
  2    461     983354839  10-MAY-12 986777711  10-MAY-12
  2    462     986777711  10-MAY-12 990325345  10-MAY-12
  2    463     990325345  10-MAY-12 993843003  10-MAY-12
  2    464     993843003  10-MAY-12 997341859  10-MAY-12
  2    465     997341859  10-MAY-12 1000716872 10-MAY-12
  2    466     1000716872 10-MAY-12 1004077232 10-MAY-12
  2    467     1004077232 10-MAY-12 1007131038 10-MAY-12
  2    468     1007131038 10-MAY-12 1010139598 10-MAY-12
  2    469     1010139598 10-MAY-12 1013007924 10-MAY-12
  2    470     1013007924 10-MAY-12 1016591483 10-MAY-12
  2    471     1016591483 10-MAY-12 1018305863 10-MAY-12
  2    472     1018305863 10-MAY-12 1019799100 10-MAY-12
  2    473     1019799100 10-MAY-12 1021053684 10-MAY-12
  2    474     1021053684 10-MAY-12 1023284490 10-MAY-12
  2    475     1023284490 10-MAY-12 1025970592 10-MAY-12
  2    476     1025970592 10-MAY-12 1027255004 10-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
113     28.59G     SBT_TAPE    00:05:36     14-MAY-12
        BP Key: 113   Status: AVAILABLE  Compressed: NO  Tag: TAG20120514T201228
        Handle: 3onb02dd_1_1   Media: 210

  List of Archived Logs in backup set 113
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    675     1166393473 14-MAY-12 1170425832 14-MAY-12
  1    676     1170425832 14-MAY-12 1174541797 14-MAY-12
  1    677     1174541797 14-MAY-12 1178736616 14-MAY-12
  1    678     1178736616 14-MAY-12 1183049717 14-MAY-12
  1    679     1183049717 14-MAY-12 1187323767 14-MAY-12
  1    680     1187323767 14-MAY-12 1191129096 14-MAY-12
  1    681     1191129096 14-MAY-12 1194605143 14-MAY-12
  1    682     1194605143 14-MAY-12 1198748230 14-MAY-12
  2    537     1166393515 14-MAY-12 1170363336 14-MAY-12
  2    538     1170363336 14-MAY-12 1174506310 14-MAY-12
  2    539     1174506310 14-MAY-12 1178108902 14-MAY-12
  2    540     1178108902 14-MAY-12 1182168217 14-MAY-12
  2    541     1182168217 14-MAY-12 1186382158 14-MAY-12
  2    542     1186382158 14-MAY-12 1190759127 14-MAY-12
  2    543     1190759127 14-MAY-12 1194659328 14-MAY-12
  2    544     1194659328 14-MAY-12 1199075304 14-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
115     35.24G     SBT_TAPE    00:03:52     14-MAY-12
        BP Key: 121   Status: AVAILABLE  Compressed: NO  Tag: TAG20120514T221955
        Handle: 3qnb09sb_1_2   Media: 209

  List of Archived Logs in backup set 115
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    675     1166393473 14-MAY-12 1170425832 14-MAY-12
  1    676     1170425832 14-MAY-12 1174541797 14-MAY-12
  1    677     1174541797 14-MAY-12 1178736616 14-MAY-12
  1    678     1178736616 14-MAY-12 1183049717 14-MAY-12
  1    679     1183049717 14-MAY-12 1187323767 14-MAY-12
  1    680     1187323767 14-MAY-12 1191129096 14-MAY-12
  1    681     1191129096 14-MAY-12 1194605143 14-MAY-12
  1    682     1194605143 14-MAY-12 1198748230 14-MAY-12
  1    683     1198748230 14-MAY-12 1202071770 14-MAY-12
  1    684     1202071770 14-MAY-12 1202375988 14-MAY-12
  1    685     1202375988 14-MAY-12 1202779458 14-MAY-12
  1    686     1202779458 14-MAY-12 1202788686 14-MAY-12
  2    537     1166393515 14-MAY-12 1170363336 14-MAY-12
  2    538     1170363336 14-MAY-12 1174506310 14-MAY-12
  2    539     1174506310 14-MAY-12 1178108902 14-MAY-12
  2    540     1178108902 14-MAY-12 1182168217 14-MAY-12
  2    541     1182168217 14-MAY-12 1186382158 14-MAY-12
  2    542     1186382158 14-MAY-12 1190759127 14-MAY-12
  2    543     1190759127 14-MAY-12 1194659328 14-MAY-12
  2    544     1194659328 14-MAY-12 1199075304 14-MAY-12
  2    545     1199075304 14-MAY-12 1202779476 14-MAY-12
  2    546     1202779476 14-MAY-12 1202788726 14-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
118     31.52G     SBT_TAPE    00:03:32     15-MAY-12
        BP Key: 123   Status: AVAILABLE  Compressed: NO  Tag: TAG20120515T064618
        Handle: 3tnb17hq_1_2   Media: 211

  List of Archived Logs in backup set 118
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    687     1202788686 14-MAY-12 1202825997 14-MAY-12
  1    688     1202825997 14-MAY-12 1204566856 14-MAY-12
  1    689     1204566856 14-MAY-12 1207670647 14-MAY-12
  1    690     1207670647 14-MAY-12 1209447849 15-MAY-12
  1    691     1209447849 15-MAY-12 1211087824 15-MAY-12
  1    692     1211087824 15-MAY-12 1213213660 15-MAY-12
  1    693     1213213660 15-MAY-12 1216624373 15-MAY-12
  1    694     1216624373 15-MAY-12 1218624957 15-MAY-12
  1    695     1218624957 15-MAY-12 1219808615 15-MAY-12
  1    696     1219808615 15-MAY-12 1221489035 15-MAY-12
  1    697     1221489035 15-MAY-12 1221571470 15-MAY-12
  2    547     1202788726 14-MAY-12 1205761252 14-MAY-12
  2    548     1205761252 14-MAY-12 1208297636 14-MAY-12
  2    549     1208297636 14-MAY-12 1210128910 15-MAY-12
  2    550     1210128910 15-MAY-12 1212164951 15-MAY-12
  2    551     1212164951 15-MAY-12 1215075174 15-MAY-12
  2    552     1215075174 15-MAY-12 1217805884 15-MAY-12
  2    553     1217805884 15-MAY-12 1219215368 15-MAY-12
  2    554     1219215368 15-MAY-12 1221528195 15-MAY-12
  2    555     1221528195 15-MAY-12 1221571407 15-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
134     32.43G     DISK        00:03:47     18-MAY-12
        BP Key: 138   Status: EXPIRED  Compressed: NO  Tag: TAG20120518T065457
        Piece Name: +ARCHIVE/ORCLLIVE/backupset/2012_05_18/annnf0_tag20120518t065457_0.2532.783586499

  List of Archived Logs in backup set 134
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    750     1371204057 17-MAY-12 1371450323 17-MAY-12
  1    751     1371450323 17-MAY-12 1373459484 17-MAY-12
  1    752     1373459484 17-MAY-12 1376243154 18-MAY-12
  1    753     1376243154 18-MAY-12 1378162990 18-MAY-12
  1    754     1378162990 18-MAY-12 1379781261 18-MAY-12
  1    755     1379781261 18-MAY-12 1382025374 18-MAY-12
  1    756     1382025374 18-MAY-12 1385077819 18-MAY-12
  1    757     1385077819 18-MAY-12 1387039353 18-MAY-12
  1    758     1387039353 18-MAY-12 1388204513 18-MAY-12
  1    759     1388204513 18-MAY-12 1390433218 18-MAY-12
  1    760     1390433218 18-MAY-12 1390593122 18-MAY-12
  2    602     1371204147 17-MAY-12 1374163876 17-MAY-12
  2    603     1374163876 17-MAY-12 1376817618 18-MAY-12
  2    604     1376817618 18-MAY-12 1378715667 18-MAY-12
  2    605     1378715667 18-MAY-12 1380491289 18-MAY-12
  2    606     1380491289 18-MAY-12 1383309562 18-MAY-12
  2    607     1383309562 18-MAY-12 1386137004 18-MAY-12
  2    608     1386137004 18-MAY-12 1387622877 18-MAY-12
  2    609     1387622877 18-MAY-12 1390593239 18-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
139     3.17G      DISK        00:08:06     18-MAY-12
        BP Key: 143   Status: AVAILABLE  Compressed: YES  Tag: TAG20120518T204917
        Piece Name: /u02/backup/rman/Primary_bkp_standby_4nnbam2e_1_1.arc

  List of Archived Logs in backup set 139
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    768     1415520824 18-MAY-12 1419487053 18-MAY-12
  1    769     1419487053 18-MAY-12 1423553921 18-MAY-12
  1    770     1423553921 18-MAY-12 1427041014 18-MAY-12
  2    617     1416095980 18-MAY-12 1419843766 18-MAY-12
  2    618     1419843766 18-MAY-12 1423785744 18-MAY-12
  2    619     1423785744 18-MAY-12 1427041002 18-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
140     3.79G      DISK        00:09:42     18-MAY-12
        BP Key: 144   Status: AVAILABLE  Compressed: YES  Tag: TAG20120518T204917
        Piece Name: /u02/backup/rman/Primary_bkp_standby_4lnbam2e_1_1.arc

  List of Archived Logs in backup set 140
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    761     1390593122 18-MAY-12 1394341280 18-MAY-12
  1    762     1394341280 18-MAY-12 1398190030 18-MAY-12
  1    763     1398190030 18-MAY-12 1401486217 18-MAY-12
  1    764     1401486217 18-MAY-12 1404656935 18-MAY-12
  2    610     1390593239 18-MAY-12 1394685530 18-MAY-12
  2    611     1394685530 18-MAY-12 1398742849 18-MAY-12
  2    612     1398742849 18-MAY-12 1401754742 18-MAY-12

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
141     3.86G      DISK        00:09:48     18-MAY-12
        BP Key: 145   Status: AVAILABLE  Compressed: YES  Tag: TAG20120518T204917
        Piece Name: /u02/backup/rman/Primary_bkp_standby_4mnbam2e_1_1.arc

  List of Archived Logs in backup set 141
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    765     1404656935 18-MAY-12 1407693733 18-MAY-12
  1    766     1407693733 18-MAY-12 1411345355 18-MAY-12
  1    767     1411345355 18-MAY-12 1415520824 18-MAY-12
  2    613     1401754742 18-MAY-12 1405903024 18-MAY-12
  2    614     1405903024 18-MAY-12 1410372568 18-MAY-12
  2    615     1410372568 18-MAY-12 1412796923 18-MAY-12
  2    616     1412796923 18-MAY-12 1416095980 18-MAY-12

RMAN> recover database until sequence 771;

Starting recover at 18-MAY-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=5671 device type=DISK

starting media recovery

channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=770
channel ORA_DISK_1: restoring archived log
archived log thread=2 sequence=619
channel ORA_DISK_1: reading from backup piece /u02/backup/rman/Primary_bkp_standby_4nnbam2e_1_1.arc
channel ORA_DISK_1: piece handle=/u02/backup/rman/Primary_bkp_standby_4nnbam2e_1_1.arc tag=TAG20120518T204917
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:09:15
archived log file name=+ARCHIVE/ORCLLIVEsby/archivelog/2012_05_18/thread_1_seq_770.268.783644669 thread=1 sequence=770
archived log file name=+ARCHIVE/ORCLLIVEsby/archivelog/2012_05_18/thread_2_seq_619.270.783644667 thread=2 sequence=619
channel default: deleting archived log(s)
archived log file name=+ARCHIVE/ORCLLIVEsby/archivelog/2012_05_18/thread_2_seq_619.270.783644667 RECID=2 STAMP=783645219
unable to find archived log
archived log thread=2 sequence=620
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/18/2012 23:13:48
RMAN-06054: media recovery requesting unknown archived log for thread 2 with sequence 620 and starting SCN of 1427041002


3) Make appropriate changes for tnsnames.ora & create appropriate password file also

4) Enable MRP on standby database.



Wednesday, May 9, 2012

ORA-20000: no statistics are imported while Refershing schema statistics from production to UAT in 11gR2


We have to refresh schema statistics from PROD to UAT , but while importing to UAT i was getting the below error (ORA-20000: no statistics are imported)

The schema name in prod is 'OBLLIVE' having tablespace 'prod'
The schema name in UAT is 'UATLIVE' having tablespace 'livetest'

IN PROD database server
=======================
SQL> show user
USER is "OBLLIVE"
SQL> EXEC DBMS_STATS.CREATE_STAT_TABLE (OWNNAME=>'OBLLIVE',STATTAB=>'STATS');

PL/SQL procedure successfully completed.
SQL> select table_name from user_tables where table_name like '%STATS%';

TABLE_NAME
------------------------------
STATS

SQL> EXEC DBMS_STATS.EXPORT_SCHEMA_STATS (OWNNAME =>'OBLLIVE',STATTAB =>'STATS');

PL/SQL procedure successfully completed.


bash-4.1$ expdp tables=OBLLIVE.STATS directory=EXPDP_DIR dumpfile=STATS_OBLLIVE_07012012.dmp logfile=STATS_OBLLIVE_07012012.log

successful

IN UAT database server
========================

bash-4.1$ impdp REMAP_SCHEMA=obllive:uatlive REMAP_TABLESPACE=prod:livetest DIRECTORY=impdp_dir DUMPFILE=STATS_OBLLIVE_07012012.dmp 
LOGFILE=STATS_OBLLIVE_07012012.log

successful

SQL> select table_name from user_tables where table_name like '%STATS%';

TABLE_NAME
------------------------------
STATS

SQL> show user
USER is "UATLIVE"

SQL> EXEC DBMS_STATS.IMPORT_SCHEMA_STATS (ownname =>'UATLIVE',stattab => 'STATS');
BEGIN DBMS_STATS.IMPORT_SCHEMA_STATS (ownname =>'UATLIVE',stattab => 'STATS'); END;

*
ERROR at line 1:
ORA-20000: no statistics are imported
ORA-06512: at "SYS.DBMS_STATS", line 10603
ORA-06512: at line 1

Solution/Workaround for this Error is as below

ACTION PLAN
============

Before proceeding with the import of statistics , Update the column C5 of of the stats table as follow :

1.
connect UATLIVE

update stats set c5 = 'UATLIVE' where c5='OBLLIVE';

SQL> EXEC DBMS_STATS.IMPORT_SCHEMA_STATS (ownname =>'UATLIVE',stattab => 'STATS');

Registering a database with GRID cluster in 11g

  • I had recently made a clone test database in my server, but when i was trying to start/stop this using srvctl it was failing with below errors
         [oracle@localhost ~]$ ps -fe|grep pmon
         grid      3960     1  0 15:57 ?        00:00:00 asm_pmon_+ASM
         oracle    4179     1  0 16:33 ?        00:00:00 ora_pmon_tstdbdup
         oracle    4284  3702  0 16:36 pts/1    00:00:00 grep pmon
        [oracle@localhost ~]$ echo $ORACLE_SID
        tstdbdup
        [oracle@localhost ~]$ srvctl stop database -d tstdbdup
        PRCD-1120 : The resource for database tstdbdup could not be found.
        PRCR-1001 : Resource ora.tstdbdup.db does not exist
        [oracle@localhost ~]$ id

  • When i checked in my cluster the db resource was not registered.(no entry as ora.tstdbdup.db)
       [grid@localhost ~]$ crsctl stat res -t
       --------------------------------------------------------------------------------
       NAME           TARGET  STATE        SERVER                   STATE_DETAILS
       --------------------------------------------------------------------------------
       Local Resources
       --------------------------------------------------------------------------------
       ora.DATA.dg
               ONLINE  ONLINE       localhost
      ora.LISTENER.lsnr
               ONLINE  ONLINE       localhost
      ora.asm
               ONLINE  ONLINE       localhost                Started
      --------------------------------------------------------------------------------
      Cluster Resources
     --------------------------------------------------------------------------------
     ora.cssd
        1        ONLINE  ONLINE       localhost
    ora.diskmon
      1        ONLINE  ONLINE       localhost
    ora.labdb.db
      1        OFFLINE OFFLINE
    

  • I again registered the database with cluster as below.
      [oracle@localhost ~]$ echo $ORACLE_HOME
      /u01/app/oracle/oracle11201
      [oracle@localhost ~]$ srvctl add database -d tstdbdup -o /u01/app/oracle/oracle11201
      [oracle@localhost ~]$ srvctl stop database -d tstdbdup -o immediate
      PRCC-1016 : tstdbdup was already stopped
     [oracle@localhost ~]$ srvctl start database -d tstdbdup
     [oracle@localhost ~]$ srvctl stop database -d tstdbdup -o immediate
     [oracle@localhost ~]$ srvctl start database -d tstdbdup
  • I did the start and stop of  database from SRVCTL utility(oracle user) to verify it works fine. Also did a check from clusterware it looks fine.
        [grid@localhost app]$ crsctl stat res -t
        --------------------------------------------------------------------------------
       NAME           TARGET  STATE        SERVER                   STATE_DETAILS
       --------------------------------------------------------------------------------
       Local Resources
      --------------------------------------------------------------------------------
     ora.DATA.dg
               ONLINE  ONLINE       localhost
     ora.LISTENER.lsnr
               ONLINE  ONLINE       localhost
    ora.asm
               ONLINE  ONLINE       localhost                Started
    --------------------------------------------------------------------------------
   Cluster Resources
   --------------------------------------------------------------------------------
   ora.cssd
      1        ONLINE  ONLINE       localhost
   ora.diskmon
      1        ONLINE  ONLINE       localhost
   ora.labdb.db
      1        OFFLINE OFFLINE
   ora.testdb.db
      1        OFFLINE OFFLINE
   ora.tstdbdup.db
      1        ONLINE  ONLINE       localhost                Open

  


Tuesday, May 8, 2012

ORA-01031: insufficient privileges message during ASM start up & clusterware(ASM) refused to come up due to insufficient privilege


  •  I had made changes to sqlnet.ora file by putting a entry "SQLNET.AUTHENTICATION_SERVICES = (NONE)" (which is by default NTS). After making the change 20mins after suddenly in the DB alert log 
i got a message like "SLAVE COMMUNICATION ERROR WITH ASM ; TERMINATING PROCESS " & DB instances went down.
  • So after that i checked the ASM status from cluster which was in intermediate state.
  • So i thought of restarting cluster again, hoping it should resolve this, after doing the stop & start of cluster services. All services except the ASM
came up giving the error message "Insufficient Privilege to start" even though i was doing as root privilege.

  • After that i thought of starting ASM instances manually but this also throws the error "ORA-01031: insufficient privileges message" . So finding no other way
i thought of first raising a SR with ORACLE & lost nearly 2 hrs by collecting diagnostics information and uploading them but didn't get ant reply for SR
  • After this did some search and came to know this happened due to the entry in the SQLNET.ora file. So reverted the change.

Resolution:

Go to the SQLNET.ora file and remove the entry for "SQLNET.AUTHENTICATION_SERVICES=(NONE)" it should be set to default i.e. (NTS)

Saturday, May 5, 2012

Recovery calalog creation RMAN


In my env i have 2 databases labdb & tstddup , i have decided to keep the recovery catalog for labdb at tstdbdup database.

Following are the steps done.

In tstdbdup database
========================

SQL> create tablespace RCAT datafile '+DATA' size 300M autoextend on;

Tablespace created.

SQL> create user RMAN identified by RMAN default tablespace RCAT quota unlimited on RCAT;

User created.

SQL> grant recovery_catalog_owner to RMAN;

Grant succeeded.

SQL> exit

[oracle@localhost admin]$ echo $ORACLE_SID
labdb
[oracle@localhost admin]$ rman

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 5 15:56:57 2012

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

RMAN> connect catalog rman@tstdbdup

recovery catalog database Password:
connected to recovery catalog database

RMAN> create catalog;

recovery catalog created

RMAN> connect target /

connected to target database: LABDB (DBID=1788478824)




RMAN> report schema
2> ;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of report command at 05/05/2012 16:00:38
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalog

RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN> exit


[oracle@localhost admin]$ echo $ORACLE_SID
labdb
[oracle@localhost admin]$ rman target / catalog rman/rman@tstdbdup

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 5 16:03:51 2012

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

connected to target database: LABDB (DBID=1788478824)
connected to recovery catalog database


[oracle@localhost ~]$ rman target / catalog rman/rman@tstdbdup

Recovery Manager: Release 11.2.0.1.0 - Production on Sat May 5 17:48:29 2012

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

connected to target database: LABDB (DBID=1788478824)
connected to recovery catalog database

RMAN> list backup;


List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
343     Full    9.95M      DISK        00:00:05     16-APR-12
        BP Key: 345   Status: AVAILABLE  Compressed: NO  Tag: TAG20120416T215518
        Piece Name: +DATA/labdb/autobackup/2012_04_16/s_780789318.666.780789321
  SPFILE Included: Modification time: 16-APR-12
  SPFILE db_unique_name: LABDB
  Control File Included: Ckp SCN: 1798072      Ckp time: 16-APR-12

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
356     Full    1006.71M   DISK        00:03:50     05-MAY-12
        BP Key: 359   Status: AVAILABLE  Compressed: NO  Tag: TAG20120505T160423
        Piece Name: +DATA/labdb/backupset/2012_05_05/nnndf0_tag20120505t160423_0.733.782496265
  List of Datafiles in backup set 356
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 2564333    05-MAY-12 +DATA/labdb/datafile/system.256.776203549
  2       Full 2564333    05-MAY-12 +DATA/labdb/datafile/sysaux.257.776203551
  3       Full 2564333    05-MAY-12 +DATA/labdb/datafile/undotbs1.258.776203551
  4       Full 2564333    05-MAY-12 +DATA/labdb/datafile/users.259.776203551

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
369     Full    9.95M      DISK        00:00:04     05-MAY-12
        BP Key: 374   Status: AVAILABLE  Compressed: NO  Tag: TAG20120505T160824
        Piece Name: +DATA/labdb/autobackup/2012_05_05/s_782496504.732.782496507
  SPFILE Included: Modification time: 05-MAY-12
  SPFILE db_unique_name: LABDB
  Control File Included: Ckp SCN: 2564582      Ckp time: 05-MAY-12

RMAN>

Friday, May 4, 2012

Using RMAN restore to create a duplicate database on a different HOST with different/same name


In my VM i have a database called TESTDB & i want to clone it to tstdbdup on a different host.

We will clone the DB with the same name first then later we will change the name

So i had followed the link "http://www.dbatutor.com/2010/12/rman-restore-rman-backup-to-different.html" & here are the screen shot of the work i did.

[oracle@localhost ~]$ ps -fe|grep pmon
grid      3931     1  0 14:54 ?        00:00:00 asm_pmon_+ASM
oracle    5414     1  0 17:06 ?        00:00:00 ora_pmon_testDB
oracle    5620  5231  0 17:24 pts/2    00:00:00 grep pmon


Step 1:Take a backup of the source database(TESTDB) as below.

RMAN> backup as compressed backupset database format '/u02/backup/rman_testDB_%s_%d_%T.bus' plus archivelog format '/u01/backup/arch_testDB_%s_%d_%T.arc';


Starting backup at 04-MAY-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=44 RECID=40 STAMP=781885927
input archived log thread=1 sequence=45 RECID=41 STAMP=781886354
input archived log thread=1 sequence=46 RECID=42 STAMP=782234385
input archived log thread=1 sequence=47 RECID=43 STAMP=782418077
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/u01/backup/arch_testDB_26_TESTDB_20120504.arc tag=TAG20120504T182117 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
Finished backup at 04-MAY-12

Starting backup at 04-MAY-12
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/testdb/datafile/system.691.781606239
input datafile file number=00002 name=+DATA/testdb/datafile/sysaux.692.781606241
input datafile file number=00003 name=+DATA/testdb/datafile/undotbs1.693.781606241
input datafile file number=00004 name=+DATA/testdb/datafile/users.694.781606241
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/u02/backup/rman_testDB_27_TESTDB_20120504.bus tag=TAG20120504T182134 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:35
Finished backup at 04-MAY-12

Starting backup at 04-MAY-12
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting compressed archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=48 RECID=44 STAMP=782418250
channel ORA_DISK_1: starting piece 1 at 04-MAY-12
channel ORA_DISK_1: finished piece 1 at 04-MAY-12
piece handle=/u01/backup/arch_testDB_28_TESTDB_20120504.arc tag=TAG20120504T182411 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 04-MAY-12

Starting Control File and SPFILE Autobackup at 04-MAY-12
piece handle=/u02/backup/c-2564934505-20120504-00 comment=NONE
Finished Control File and SPFILE Autobackup at 04-MAY-12

RMAN> list backup
2> ;


List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
25      31.25M     DISK        00:00:13     04-MAY-12
        BP Key: 25   Status: AVAILABLE  Compressed: YES  Tag: TAG20120504T182117
        Piece Name: /u01/backup/arch_testDB_26_TESTDB_20120504.arc

  List of Archived Logs in backup set 25
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    44      2513198    29-APR-12 2538899    29-APR-12
  1    45      2538899    29-APR-12 2558433    29-APR-12
  1    46      2558433    29-APR-12 2586068    02-MAY-12
  1    47      2586068    02-MAY-12 2590564    04-MAY-12

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
26      Full    256.04M    DISK        00:02:28     04-MAY-12
        BP Key: 26   Status: AVAILABLE  Compressed: YES  Tag: TAG20120504T182134
        Piece Name: /u02/backup/rman_testDB_27_TESTDB_20120504.bus
  List of Datafiles in backup set 26
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 2590572    04-MAY-12 +DATA/testdb/datafile/system.691.781606239
  2       Full 2590572    04-MAY-12 +DATA/testdb/datafile/sysaux.692.781606241
  3       Full 2590572    04-MAY-12 +DATA/testdb/datafile/undotbs1.693.781606241
  4       Full 2590572    04-MAY-12 +DATA/testdb/datafile/users.694.781606241

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
27      108.00K    DISK        00:00:01     04-MAY-12
        BP Key: 27   Status: AVAILABLE  Compressed: YES  Tag: TAG20120504T182411
        Piece Name: /u01/backup/arch_testDB_28_TESTDB_20120504.arc

  List of Archived Logs in backup set 27
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    48      2590564    04-MAY-12 2590660    04-MAY-12

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
28      Full    9.42M      DISK        00:00:03     04-MAY-12
        BP Key: 28   Status: AVAILABLE  Compressed: NO  Tag: TAG20120504T182412
        Piece Name: /u02/backup/c-2564934505-20120504-00
  SPFILE Included: Modification time: 04-MAY-12
  SPFILE db_unique_name: TESTDB
  Control File Included: Ckp SCN: 2590669      Ckp time: 04-MAY-12

<here in step 1 we have to note the control file backupset & the last sequence of the archivelog>

Step 2: First do some sanity check on the database TESTDB to find the log files,temp files & datafiles location , even i had also taken a trace file of the

control file of the source database. & stored the details in a notepad for later use.

Location of logfiles
=====================

SQL> select GROUP#,MEMBER from v$logfile;

    GROUP#
----------
MEMBER
--------------------------------------------------------------------------------
         3
+DATA/testdb/onlinelog/group_3.698.781606385

         2
+DATA/testdb/onlinelog/group_2.697.781606383

         1
+DATA/testdb/onlinelog/group_1.696.781606381

Location of tempfiles
=====================

SQL> select FILE_NAME,FILE_ID,TABLESPACE_NAME from dba_temp_files;

FILE_NAME
--------------------------------------------------------------------------------
   FILE_ID TABLESPACE_NAME
---------- ------------------------------
+DATA/testdb/tempfile/temp.699.781606405
         1 TEMP

Location of Datafiles
=============================

SQL> select file#,NAME from v$datafile;

     FILE#
----------
NAME
--------------------------------------------------------------------------------
         1
+DATA/testdb/datafile/system.691.781606239

         2
+DATA/testdb/datafile/sysaux.692.781606241

         3
+DATA/testdb/datafile/undotbs1.693.781606241


     FILE#
----------
NAME
--------------------------------------------------------------------------------
         4
+DATA/testdb/datafile/users.694.781606241


To find generic location of all datafiles,tempfiles,logfiles
==============================================================


SQL> select distinct substr(name,1,instr(name,'/',-1)) dbf_con_str from v$tempfile;

DBF_CON_STR
--------------------------------------------------------------------------------
+DATA/testdb/tempfile/

SQL> select distinct substr(name,1,instr(name,'/',-1)) dbf_con_str from v$datafile;

DBF_CON_STR
--------------------------------------------------------------------------------
+DATA/testdb/datafile/


SQL> select distinct substr(member,1,instr(member,'/',-1)) logfile_con_str from v$logfile where type='ONLINE';

LOGFILE_CON_STR
--------------------------------------------------------------------------------
+DATA/testdb/onlinelog/

trace control file from source<testdb> database(from bdump location as *.trc file)
=============================================================================

SQL> alter database backup controlfile to trace
  2  ;

Database altered.
SQL> show parameter dump

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
background_core_dump                 string      partial
background_dump_dest                 string      /u01/app/oracle/diag/rdbms/tes
                                                 tdb/testDB/trace
core_dump_dest                       string      /u01/app/oracle/diag/rdbms/tes
                                                 tdb/testDB/cdump
max_dump_file_size                   string      unlimited
shadow_core_dump                     string      partial
user_dump_dest                       string      /u01/app/oracle/diag/rdbms/tes
                                                 tdb/testDB/trace

[oracle@localhost ~]$ cd /u01/app/oracle/diag/rdbms/testdb/testDB/trace
[oracle@localhost trace]$ ls -ltr|grep control
[oracle@localhost trace]$ ls -ltr
total 2240

-rw-r----- 1 oracle asmadmin   7852 May  4 19:07 testDB_ora_6090.trc
-rw-r----- 1 oracle asmadmin 126399 May  4 19:07 alert_testDB.log


CREATE CONTROLFILE REUSE DATABASE "TESTDB" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '+DATA/testdb/onlinelog/group_1.696.781606381'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 '+DATA/testdb/onlinelog/group_2.697.781606383'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 '+DATA/testdb/onlinelog/group_3.698.781606385'  SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '+DATA/testdb/datafile/system.691.781606239',
  '+DATA/testdb/datafile/sysaux.692.781606241',
  '+DATA/testdb/datafile/undotbs1.693.781606241',
  '+DATA/testdb/datafile/users.694.781606241'
CHARACTER SET AL32UTF8
;


Step 3: Modify the pfile from source database(testdb) , change it as below but keep the db_name unchanged<important>

*.audit_file_dest='/u01/app/oracle/admin/testDBDUP/adump'
*.audit_trail='db'
*.blank_trimming=TRUE
*.compatible='11.2.0.0.0'
*.control_files='+DATA/testdbdup/controlfile/current.695.781606377'
*.db_block_size=8192
*.db_create_file_dest='+DATA'
*.db_domain=''
*.db_name='testDB'
*.db_recovery_file_dest_size=4294967296
*.db_recovery_file_dest='+DATA'
*.diagnostic_dest='/u01/app/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=testDBDUPXDB)'
*.open_cursors=300
*.pga_aggregate_target=158334976
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=476053504
*.undo_tablespace='UNDOTBS1'


Step 4: Start(nomount) the instance using the modified pfile


[oracle@localhost tmp]$ export ORACLE_SID=testDB
[oracle@localhost tmp]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 4 19:34:30 2012

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

Connected to an idle instance.

SQL> startup nomount pfile='/tmp/inittestdb.ora';
ORACLE instance started.

Total System Global Area  477073408 bytes
Fixed Size                  1337324 bytes
Variable Size             146802708 bytes
Database Buffers          322961408 bytes
Redo Buffers                5971968 bytes
SQL> show parameter pfile

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
spfile                               string
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost tmp]$ ps -fe|grep pmon
grid      3931     1  0 14:54 ?        00:00:00 asm_pmon_+ASM
oracle    6502     1  0 19:36 ?        00:00:00 ora_pmon_testDB
oracle    6562  6287  0 19:37 pts/1    00:00:00 grep pmon


Step 5: Now from RMAN connect to the database as below & restore the control file < make sure u have created the ASM disk path i.e.

+DATA/testdbdup/controlfile/ > and mount the database


[oracle@localhost rdbms]$  echo $ORACLE_SID
testDB
[oracle@localhost rdbms]$ rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri May 4 19:54:21 2012

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

connected to target database: TESTDB (not mounted)

RMAN> restore controlfile from '/u02/backup/c-2564934505-20120504-00';

Starting restore at 04-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=23 device type=DISK

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:08
output file name=+DATA/testdbdup/controlfile/control01.ctl
Finished restore at 04-MAY-12


RMAN> alter database mount
2> ;

database mounted
released channel: ORA_DISK_1


Step 6: Now connect to the database mounted in sqlplus & rename the logfiles and tempfiles


SQL> select name,open_mode,database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
TESTDB    MOUNTED              PRIMARY

SQL>
SQL>
SQL> alter database rename file '+DATA/testdb/onlinelog/group_3.698.781606385' to '+DATA/testdbdup/onlinelog/log01.dbf';

Database altered.

SQL> alter database rename file '+DATA/testdb/onlinelog/group_2.697.781606383' to '+DATA/testdbdup/onlinelog/log02.dbf';

Database altered.

SQL> alter database rename file '+DATA/testdb/onlinelog/group_1.696.781606381' to '+DATA/testdbdup/onlinelog/log03.dbf';

Database altered.

SQL> alter database rename file '+DATA/testdb/tempfile/temp.699.781606405' to '+DATA/testdbdup/tempfile/tmp01.dbf';

Database altered.


Step 7: Do the set new name for the datafiles as in below rman run script & execute as below . set until clause as sequence number+1


RMAN> run{

set until sequence 49;
set newname for datafile 1 to '+DATA/testdbdup/datafile/system01.dbf';
set newname for datafile 2 to '+DATA/testdbdup/datafile/sysaux01.dbf';
set newname for datafile 3 to '+DATA/testdbdup/datafile/undotbs1.dbf';
set newname for datafile 4 to '+DATA/testdbdup/datafile/users01.dbf';
restore database;
switch datafile all;
recover database;
}14> 15> 16> 17> 18>

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 04-MAY-12
Starting implicit crosscheck backup at 04-MAY-12
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=26 device type=DISK
Crosschecked 3 objects
Finished implicit crosscheck backup at 04-MAY-12

Starting implicit crosscheck copy at 04-MAY-12
using channel ORA_DISK_1
Finished implicit crosscheck copy at 04-MAY-12

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: +data/TESTDB/CONTROLFILE/current.742.782422753

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 +DATA/testdbdup/datafile/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to +DATA/testdbdup/datafile/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to +DATA/testdbdup/datafile/undotbs1.dbf
channel ORA_DISK_1: restoring datafile 00004 to +DATA/testdbdup/datafile/users01.dbf
channel ORA_DISK_1: reading from backup piece /u02/backup/rman_testDB_27_TESTDB_20120504.bus
channel ORA_DISK_1: piece handle=/u02/backup/rman_testDB_27_TESTDB_20120504.bus tag=TAG20120504T182134
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:56
Finished restore at 04-MAY-12

datafile 1 switched to datafile copy
input datafile copy RECID=6 STAMP=782425582 file name=+DATA/testdbdup/datafile/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=7 STAMP=782425582 file name=+DATA/testdbdup/datafile/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=8 STAMP=782425582 file name=+DATA/testdbdup/datafile/undotbs1.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=9 STAMP=782425582 file name=+DATA/testdbdup/datafile/users01.dbf

Starting recover at 04-MAY-12
using channel ORA_DISK_1

starting media recovery

archived log for thread 1 with sequence 48 is already on disk as file +DATA/testdb/archivelog/2012_05_04/thread_1_seq_48.743.782418251
archived log file name=+DATA/testdb/archivelog/2012_05_04/thread_1_seq_48.743.782418251 thread=1 sequence=48
media recovery complete, elapsed time: 00:00:02
Finished recover at 04-MAY-12




Step 8: Now take a trace of the control file & modify the database name(db_name) in it and save this file as .sql file


SQL> alter database backup controlfile to trace;

Database altered.

CREATE CONTROLFILE SET DATABASE "TSTDBDUP" RESETLOGS  ARCHIVELOG
    MAXLOGFILES 16
    MAXLOGMEMBERS 3
    MAXDATAFILES 100
    MAXINSTANCES 8
    MAXLOGHISTORY 292
LOGFILE
  GROUP 1 '+DATA/testdbdup/onlinelog/log03.dbf'  SIZE 50M BLOCKSIZE 512,
  GROUP 2 '+DATA/testdbdup/onlinelog/log02.dbf'  SIZE 50M BLOCKSIZE 512,
  GROUP 3 '+DATA/testdbdup/onlinelog/log01.dbf'  SIZE 50M BLOCKSIZE 512
-- STANDBY LOGFILE
DATAFILE
  '+DATA/testdbdup/datafile/system01.dbf',
  '+DATA/testdbdup/datafile/sysaux01.dbf',
  '+DATA/testdbdup/datafile/undotbs1.dbf',
  '+DATA/testdbdup/datafile/users01.dbf'
CHARACTER SET AL32UTF8
;

Step 9: Now shutdown the database and make changes for db_name in init.ora file from testDB to tstdbdup.

<note: the database name shouldnot exceed more than 8 characters can see the error message below>

**********************************************************

[oracle@localhost tmp]$ echo $ORACLE_SID
testdbdup
[oracle@localhost tmp]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 4 20:51:14 2012

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

Connected to an idle instance.

SQL> startup nomount pfile='/tmp/inittestdb.ora'
ORA-01127: database name 'TESTDBDUP' exceeds size limit of 8 characters
SQL> exit
Disconnected

***********************************************************

[oracle@localhost tmp]$ export ORACLE_SID=tstdbdup
[oracle@localhost tmp]$ vi control_testdbdup.sql
[oracle@localhost tmp]$ echo $ORACLE_SID
tstdbdup
[oracle@localhost tmp]$
[oracle@localhost tmp]$
[oracle@localhost tmp]$
[oracle@localhost tmp]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Fri May 4 20:54:11 2012

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

Connected to an idle instance.

SQL> startup nomount pfile='/tmp/inittestdb.ora'
ORACLE instance started.

Total System Global Area  477073408 bytes
Fixed Size                  1337324 bytes
Variable Size             146802708 bytes
Database Buffers          322961408 bytes
Redo Buffers                5971968 bytes
SQL> @/tmp/control_testdbdup.sql
CREATE CONTROLFILE SET DATABASE "TSTDBDUP" RESETLOGS  ARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-00200: control file could not be created
ORA-00202: control file: '+DATA/testdbdup/controlfile/control01.ctl'
ORA-17502: ksfdcre:4 Failed to create file
+DATA/testdbdup/controlfile/control01.ctl
ORA-15005: name "testdbdup/controlfile/control01.ctl" is already used by an
existing alias

<Note: remove the existing control file from ASM location and again execute the command>

SQL> @/tmp/control_testdbdup.sql

Control file created.

SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01100: database already mounted


SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open


SQL> alter database open resetlogs;

Database altered.

SQL> select name,open_mode,database_role from v$database;

NAME      OPEN_MODE            DATABASE_ROLE
--------- -------------------- ----------------
TSTDBDUP  READ WRITE           PRIMARY

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@localhost tmp]$



Thursday, May 3, 2012

Duplicate database from 2 node RAC to single instance in the same host using tape


$ rman target sys/OracleEnterpriseMgr@ORCLLIVE1 auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Thu May 3 15:13:59 2012

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

connected to target database: ORCLLIVE (DBID=XXXXXXX)
connected to auxiliary database: DWREP (not mounted)

RMAN> duplicate target database to DWREP;

Starting Duplicate Db at 03-MAY-12
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=2828 device type=DISK

contents of Memory Script:
{
   sql clone "alter system set  db_name =
 ''ORCLLIVE'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name =
 ''DWREP'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   shutdown clone immediate;
   startup clone force nomount
   restore clone primary controlfile;
   alter clone database mount;
}
executing Memory Script

sql statement: alter system set  db_name =  ''ORCLLIVE'' comment= ''Modified by RMAN duplicate'' scope=spfile

sql statement: alter system set  db_unique_name =  ''DWREP'' comment= ''Modified by RMAN duplicate'' scope=spfile

Oracle instance shut down

Oracle instance started

Total System Global Area    4275781632 bytes

Fixed Size                     2213632 bytes
Variable Size               2818574592 bytes
Database Buffers            1442840576 bytes
Redo Buffers                  12152832 bytes

Starting restore at 03-MAY-12
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=2514 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece +ARCHIVE/ORCLLIVE/backup/c-XXXXXXX-20120503-01
channel ORA_AUX_DISK_1: piece handle=+ARCHIVE/ORCLLIVE/backup/c-XXXXXXX-20120503-01 tag=TAG20120503T144805
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:02
output file name=+DATA/dwrep/controlfile/control01.ctl
output file name=+ARCHIVE/dwrep/controlfile/control02.ctl
Finished restore at 03-MAY-12

database mounted
RMAN-05529: WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to disk group only.

contents of Memory Script:
{
   set until scn  421561242;
   set newname for datafile  1 to
 "+data";
   set newname for datafile  2 to
 "+data";
   set newname for datafile  3 to
 "+data";
   set newname for datafile  4 to
 "+data";
   set newname for datafile  5 to
 "+data";
   set newname for datafile  6 to
 "+data";
   set newname for datafile  7 to
 "+data";
   set newname for datafile  8 to
 "+data";
   set newname for datafile  9 to
 "+data";
   set newname for datafile  10 to
 "+data";
   set newname for datafile  11 to
 "+data";
   set newname for datafile  12 to
 "+data";
   set newname for datafile  13 to
 "+data";
   set newname for datafile  14 to
 "+data";
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 03-MAY-12
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to +data
channel ORA_AUX_DISK_1: restoring datafile 00002 to +data
channel ORA_AUX_DISK_1: restoring datafile 00003 to +data
channel ORA_AUX_DISK_1: restoring datafile 00004 to +data
channel ORA_AUX_DISK_1: restoring datafile 00005 to +data
channel ORA_AUX_DISK_1: restoring datafile 00006 to +data
channel ORA_AUX_DISK_1: restoring datafile 00007 to +data
channel ORA_AUX_DISK_1: restoring datafile 00008 to +data
channel ORA_AUX_DISK_1: restoring datafile 00009 to +data
channel ORA_AUX_DISK_1: restoring datafile 00010 to +data
channel ORA_AUX_DISK_1: restoring datafile 00011 to +data
channel ORA_AUX_DISK_1: restoring datafile 00012 to +data
channel ORA_AUX_DISK_1: restoring datafile 00013 to +data
channel ORA_AUX_DISK_1: restoring datafile 00014 to +data
channel ORA_AUX_DISK_1: reading from backup piece +ARCHIVE/ORCLLIVE/backup/cbeliv
channel ORA_AUX_DISK_1: piece handle=+ARCHIVE/ORCLLIVE/backup/ORCLLIVE_ORCLLIVE_1bna2e2r_1_1 tag=TAG20120503T142739
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:24:05
Finished restore at 03-MAY-12

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=15 STAMP=782321922 file name=+DATA/dwrep/datafile/system.460.782321381
datafile 2 switched to datafile copy
input datafile copy RECID=16 STAMP=782321922 file name=+DATA/dwrep/datafile/sysaux.461.782321323
datafile 3 switched to datafile copy
input datafile copy RECID=17 STAMP=782321922 file name=+DATA/dwrep/datafile/undotbs1.314.782320863
datafile 4 switched to datafile copy
input datafile copy RECID=18 STAMP=782321922 file name=+DATA/dwrep/datafile/users.459.782321431
datafile 5 switched to datafile copy
input datafile copy RECID=19 STAMP=782321922 file name=+DATA/dwrep/datafile/undotbs2.390.782320829
datafile 6 switched to datafile copy
input datafile copy RECID=20 STAMP=782321922 file name=+DATA/dwrep/datafile/t24distdata.329.782320477
datafile 7 switched to datafile copy
input datafile copy RECID=21 STAMP=782321922 file name=+DATA/dwrep/datafile/t24distindex.388.782320895
datafile 8 switched to datafile copy
input datafile copy RECID=22 STAMP=782321922 file name=+DATA/dwrep/datafile/t24distdata.391.782320549
datafile 9 switched to datafile copy
input datafile copy RECID=23 STAMP=782321922 file name=+DATA/dwrep/datafile/t24distdata.393.782320631
datafile 10 switched to datafile copy
input datafile copy RECID=24 STAMP=782321922 file name=+DATA/dwrep/datafile/sysaux.328.782321017
datafile 11 switched to datafile copy
input datafile copy RECID=25 STAMP=782321922 file name=+DATA/dwrep/datafile/t24distdata.392.782320715
datafile 12 switched to datafile copy
input datafile copy RECID=26 STAMP=782321922 file name=+DATA/dwrep/datafile/system.278.782321375
datafile 13 switched to datafile copy
input datafile copy RECID=27 STAMP=782321922 file name=+DATA/dwrep/datafile/t24distdata.389.782320789
datafile 14 switched to datafile copy
input datafile copy RECID=28 STAMP=782321922 file name=+DATA/dwrep/datafile/t24distdata.284.782321053

contents of Memory Script:
{
   set until scn  421561242;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script

executing command: SET until clause

Starting recover at 03-MAY-12
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 274 is already on disk as file +ARCHIVE/ORCLLIVE/archivelog/2012_05_03/thread_1_seq_274.1151.782318755
archived log for thread 1 with sequence 275 is already on disk as file +ARCHIVE/ORCLLIVE/archivelog/2012_05_03/thread_1_seq_275.882.782318849
archived log for thread 2 with sequence 216 is already on disk as file +ARCHIVE/ORCLLIVE/archivelog/2012_05_03/thread_2_seq_216.5352.782318847
archived log file name=+ARCHIVE/ORCLLIVE/archivelog/2012_05_03/thread_1_seq_274.1151.782318755 thread=1 sequence=274
archived log file name=+ARCHIVE/ORCLLIVE/archivelog/2012_05_03/thread_2_seq_216.5352.782318847 thread=2 sequence=216
archived log file name=+ARCHIVE/ORCLLIVE/archivelog/2012_05_03/thread_1_seq_275.882.782318849 thread=1 sequence=275
media recovery complete, elapsed time: 00:01:07
Finished recover at 03-MAY-12

contents of Memory Script:
{
   shutdown clone immediate;
   startup clone nomount;
   sql clone "alter system set  db_name =
 ''DWREP'' comment=
 ''Reset to original value by RMAN'' scope=spfile";
   sql clone "alter system reset  db_unique_name scope=spfile";
   shutdown clone immediate;
   startup clone nomount;
}
executing Memory Script

database dismounted
Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    4275781632 bytes

Fixed Size                     2213632 bytes
Variable Size               2835351808 bytes
Database Buffers            1426063360 bytes
Redo Buffers                  12152832 bytes

sql statement: alter system set  db_name =  ''DWREP'' comment= ''Reset to original value by RMAN'' scope=spfile

sql statement: alter system reset  db_unique_name scope=spfile

Oracle instance shut down

connected to auxiliary database (not started)
Oracle instance started

Total System Global Area    4275781632 bytes

Fixed Size                     2213632 bytes
Variable Size               2835351808 bytes
Database Buffers            1426063360 bytes
Redo Buffers                  12152832 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DWREP" RESETLOGS ARCHIVELOG
  MAXLOGFILES    320
  MAXLOGMEMBERS      5
  MAXDATAFILES     1024
  MAXINSTANCES    32
  MAXLOGHISTORY      584
 LOGFILE
  GROUP  1 ( '+archive', '+data' ) SIZE 2 G  REUSE,
  GROUP  2 ( '+archive', '+data' ) SIZE 2 G  REUSE
 DATAFILE
  '+DATA/dwrep/datafile/system.460.782321381'
 CHARACTER SET AL32UTF8

sql statement: ALTER DATABASE ADD LOGFILE

  INSTANCE 'i2'
  GROUP  3 ( '+data', '+archive' ) SIZE 2 G  REUSE,
  GROUP  4 ( '+data', '+archive' ) SIZE 2 G  REUSE

contents of Memory Script:
{
   set newname for tempfile  1 to
 "+data";
   switch clone tempfile all;
   catalog clone datafilecopy  "+DATA/dwrep/datafile/sysaux.461.782321323",
 "+DATA/dwrep/datafile/undotbs1.314.782320863",
 "+DATA/dwrep/datafile/users.459.782321431",
 "+DATA/dwrep/datafile/undotbs2.390.782320829",
 "+DATA/dwrep/datafile/t24distdata.329.782320477",
 "+DATA/dwrep/datafile/t24distindex.388.782320895",
 "+DATA/dwrep/datafile/t24distdata.391.782320549",
 "+DATA/dwrep/datafile/t24distdata.393.782320631",
 "+DATA/dwrep/datafile/sysaux.328.782321017",
 "+DATA/dwrep/datafile/t24distdata.392.782320715",
 "+DATA/dwrep/datafile/system.278.782321375",
 "+DATA/dwrep/datafile/t24distdata.389.782320789",
 "+DATA/dwrep/datafile/t24distdata.284.782321053";
   switch clone datafile all;
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to +data in control file

cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/sysaux.461.782321323 RECID=1 STAMP=782322076
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/undotbs1.314.782320863 RECID=2 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/users.459.782321431 RECID=3 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/undotbs2.390.782320829 RECID=4 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/t24distdata.329.782320477 RECID=5 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/t24distindex.388.782320895 RECID=6 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/t24distdata.391.782320549 RECID=7 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/t24distdata.393.782320631 RECID=8 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/sysaux.328.782321017 RECID=9 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/t24distdata.392.782320715 RECID=10 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/system.278.782321375 RECID=11 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/t24distdata.389.782320789 RECID=12 STAMP=782322077
cataloged datafile copy
datafile copy file name=+DATA/dwrep/datafile/t24distdata.284.782321053 RECID=13 STAMP=782322077

datafile 2 switched to datafile copy
input datafile copy RECID=1 STAMP=782322076 file name=+DATA/dwrep/datafile/sysaux.461.782321323
datafile 3 switched to datafile copy
input datafile copy RECID=2 STAMP=782322077 file name=+DATA/dwrep/datafile/undotbs1.314.782320863
datafile 4 switched to datafile copy
input datafile copy RECID=3 STAMP=782322077 file name=+DATA/dwrep/datafile/users.459.782321431
datafile 5 switched to datafile copy
input datafile copy RECID=4 STAMP=782322077 file name=+DATA/dwrep/datafile/undotbs2.390.782320829
datafile 6 switched to datafile copy
input datafile copy RECID=5 STAMP=782322077 file name=+DATA/dwrep/datafile/t24distdata.329.782320477
datafile 7 switched to datafile copy
input datafile copy RECID=6 STAMP=782322077 file name=+DATA/dwrep/datafile/t24distindex.388.782320895
datafile 8 switched to datafile copy
input datafile copy RECID=7 STAMP=782322077 file name=+DATA/dwrep/datafile/t24distdata.391.782320549
datafile 9 switched to datafile copy
input datafile copy RECID=8 STAMP=782322077 file name=+DATA/dwrep/datafile/t24distdata.393.782320631
datafile 10 switched to datafile copy
input datafile copy RECID=9 STAMP=782322077 file name=+DATA/dwrep/datafile/sysaux.328.782321017
datafile 11 switched to datafile copy
input datafile copy RECID=10 STAMP=782322077 file name=+DATA/dwrep/datafile/t24distdata.392.782320715
datafile 12 switched to datafile copy
input datafile copy RECID=11 STAMP=782322077 file name=+DATA/dwrep/datafile/system.278.782321375
datafile 13 switched to datafile copy
input datafile copy RECID=12 STAMP=782322077 file name=+DATA/dwrep/datafile/t24distdata.389.782320789
datafile 14 switched to datafile copy
input datafile copy RECID=13 STAMP=782322077 file name=+DATA/dwrep/datafile/t24distdata.284.782321053

contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script

database opened
Finished Duplicate Db at 03-MAY-12