Sunday, March 25, 2012

11gR2 backup-based DUPLICATE / Duplicate from Backup Location


1) Take full backup of SOURCE db + Archivelog.
2) Move backup to Target server on backup location.
3) Prepare init file for Auxiliary Instance.
4) Start Duplicate using RMAN. ( please see the Note at end of the Post )

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

1) TAKE THE BACKUP OF DB PLUS ARCHIVELOG
TESTDGP:DGP:/u01/dgp/backup->rman target /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Mar 2 18:36:14 2012

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

connected to target database: DGP (DBID=1579930627)

RMAN> backup database plus archivelog not backed up 1 times;

Starting backup at 02-MAR-12

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=32 device type=DISK

allocated channel: ORA_DISK_2

channel ORA_DISK_2: SID=51 device type=DISK

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_23_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_24_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_25_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_26_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_27_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_28_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_29_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_30_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_31_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_32_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_33_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_34_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_35_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_36_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_37_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_38_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_39_772639109.dbf; already backed up 1 time(s)

skipping archived log file /u00/app/oracle/admin/DGP/arch/1_40_772639109.dbf; already backed up 1 time(s)

channel ORA_DISK_1: starting archived log backup set

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

input archived log thread=1 sequence=41 RECID=26 STAMP=774636558

input archived log thread=1 sequence=42 RECID=27 STAMP=774636857

channel ORA_DISK_1: starting piece 1 at 02-MAR-12

channel ORA_DISK_2: starting archived log backup set

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

input archived log thread=1 sequence=43 RECID=28 STAMP=776889380

channel ORA_DISK_2: starting piece 1 at 02-MAR-12

channel ORA_DISK_1: finished piece 1 at 02-MAR-12

piece handle=/u01/dgp/backup/Backup_0rn4sp15_1_1 tag=TAG20120302T183621 comment=NONE

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

channel ORA_DISK_2: finished piece 1 at 02-MAR-12

piece handle=/u01/dgp/backup/Backup_0sn4sp15_1_1 tag=TAG20120302T183621 comment=NONE

channel ORA_DISK_2: backup set complete, elapsed time: 00:00:01

Finished backup at 02-MAR-12

Starting backup at 02-MAR-12

using channel ORA_DISK_1

using channel ORA_DISK_2

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/dgp/data/system01.dbf

input datafile file number=00005 name=/u01/dgp/data/TEST.dbf

channel ORA_DISK_1: starting piece 1 at 02-MAR-12

channel ORA_DISK_2: starting full datafile backup set

channel ORA_DISK_2: specifying datafile(s) in backup set

input datafile file number=00002 name=/u01/dgp/data/sysaux01.dbf

input datafile file number=00003 name=/u01/dgp/data/undotbs01.dbf

input datafile file number=00004 name=/u01/dgp/data/users01.dbf

channel ORA_DISK_2: starting piece 1 at 02-MAR-12

channel ORA_DISK_1: finished piece 1 at 02-MAR-12

piece handle=/u01/dgp/backup/Backup_0tn4sp17_1_1 tag=TAG20120302T183622 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:05

channel ORA_DISK_2: finished piece 1 at 02-MAR-12

piece handle=/u01/dgp/backup/Backup_0un4sp17_1_1 tag=TAG20120302T183622 comment=NONE

channel ORA_DISK_2: backup set complete, elapsed time: 00:01:05

Finished backup at 02-MAR-12

Starting backup at 02-MAR-12

current log archived

using channel ORA_DISK_1

using channel ORA_DISK_2

channel ORA_DISK_1: starting archived log backup set

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

input archived log thread=1 sequence=44 RECID=29 STAMP=776889448

channel ORA_DISK_1: starting piece 1 at 02-MAR-12

channel ORA_DISK_1: finished piece 1 at 02-MAR-12

piece handle=/u01/dgp/backup/Backup_0vn4sp38_1_1 tag=TAG20120302T183728 comment=NONE

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

Finished backup at 02-MAR-12

Starting Control File and SPFILE Autobackup at 02-MAR-12

piece handle=/u01/dgp/backup/CONTROL_c-1579930627-20120302-00 comment=NONE

Finished Control File and SPFILE Autobackup at 02-MAR-12

2) MOVE TO BACKUP TO TARGET SERVER.

TESTDGP:DGP:/u01/dgp/backup->scp * oracle@169.254.12.77:/u01/dgd/backup

The authenticity of host '169.254.12.77 (169.254.12.77)' can't be established.

RSA key fingerprint is 8a:8f:1e:14:63:4f:41:0c:20:6f:7c:d1:73:a8:0a:78.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '169.254.12.77' (RSA) to the list of known hosts.

oracle@169.254.12.77's password:

TESTDGD:DGD:/u01/dgd/backup->ll

total 1270188

-rwxrwxrwx 1 oracle oinstall 9920000 Mar 2 18:53 Backup_0ln2o0da_1_1

-rwxrwxrwx 1 oracle oinstall 9459712 Mar 2 18:53 Backup_0mn2o0da_1_1

-rwxrwxrwx 1 oracle oinstall 186466304 Mar 2 18:53 Backup_0nn2o0di_1_1

-rwxrwxrwx 1 oracle oinstall 77037568 Mar 2 18:53 Backup_0on2o0di_1_1

-rwxrwxrwx 1 oracle oinstall 13312 Mar 2 18:53 Backup_0pn2o0fj_1_1

-rwxrwxrwx 1 oracle oinstall 10483712 Mar 2 18:53 Backup_0rn4sp15_1_1

-rwxrwxrwx 1 oracle oinstall 1315328 Mar 2 18:53 Backup_0sn4sp15_1_1

-rwxrwxrwx 1 oracle oinstall 612065280 Mar 2 18:54 Backup_0tn4sp17_1_1

-rwxrwxrwx 1 oracle oinstall 372899840 Mar 2 18:55 Backup_0un4sp17_1_1

-rwxrwxrwx 1 oracle oinstall 5120 Mar 2 18:55 Backup_0vn4sp38_1_1

-rwxrwxrwx 1 oracle oinstall 9830400 Mar 2 18:55 CONTROL_c-1579930627-20120207-00

-rwxrwxrwx 1 oracle oinstall 9830400 Mar 2 18:55 CONTROL_c-1579930627-20120302-00

drwxr-x--- 3 oracle oinstall 4096 Mar 2 20:23 DGD


3) Make init file for auxiliary db on Target side.
audit_file_dest='/u00/app/oracle/admin/DGD/adump'

audit_trail='DB'

compatible='11.2.0.0.0'

control_files='/u01/dgd/control/control01.ctl'

control_files='/u01/dgd/control/control02.ctl'

core_dump_dest='/u00/app/oracle/diag/rdbms/dgd/DGD/cdump'

db_block_size=8192

db_domain=''

db_name='DGD'

db_recovery_file_dest='/u01/dgd/backup'

db_recovery_file_dest_size=1000M

diagnostic_dest='/u00/app/oracle'

dispatchers='(PROTOCOL=TCP) (SERVICE=DGDXDB)'

log_buffer=4726784 # log buffer update

memory_target=252M

open_cursors=300

optimizer_dynamic_sampling=2

optimizer_mode='ALL_ROWS'

plsql_warnings='DISABLE:ALL' # PL/SQL warnings at init.ora

processes=150

query_rewrite_enabled='TRUE'

remote_login_passwordfile='EXCLUSIVE'

result_cache_max_size=672K

skip_unusable_indexes=TRUE

undo_tablespace='UNDOTBS1'

LOCAL_LISTENER=LISTENER_TESTDGD

#parameter_value_convert=('/dgp','/dgd','/DGP','/DGD')

log_file_name_convert=('dgp','dgd') db_file_name_convert=('dgp','dgd')


4) see how far you want restore.

RMAN> list backup of archivelog from sequence 39;

using target database control file instead of recovery catalog

List of Backup Sets

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

BS Key Size Device Type Elapsed Time Completion Time

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

1 9.02M DISK 00:00:02 07-feb-2012 16:39:08

BP Key: 1 Status: AVAILABLE Compressed: YES Tag: TAG20120207T163906

Piece Name: /u01/dgp/backup/Backup_0mn2o0da_1_1

List of Archived Logs in backup set 1

Thrd Seq Low SCN Low Time Next SCN Next Time

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

1 39 1009921 07-feb-2012 16:36:55 1009995 07-feb-2012 16:39:06

BS Key Size Device Type Elapsed Time Completion Time

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

5 12.50K DISK 00:00:00 07-feb-2012 16:40:19

BP Key: 5 Status: AVAILABLE Compressed: YES Tag: TAG20120207T164019

Piece Name: /u01/dgp/backup/Backup_0pn2o0fj_1_1

List of Archived Logs in backup set 5

Thrd Seq Low SCN Low Time Next SCN Next Time

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

1 40 1009995 07-feb-2012 16:39:06 1010041 07-feb-2012 16:40:19

BS Key Size Device Type Elapsed Time Completion Time

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

7 1.25M DISK 00:00:00 02-mar-2012 18:36:21

BP Key: 7 Status: AVAILABLE Compressed: NO Tag: TAG20120302T183621

Piece Name: /u01/dgp/backup/Backup_0sn4sp15_1_1

List of Archived Logs in backup set 7

Thrd Seq Low SCN Low Time Next SCN Next Time

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

1 43 1011700 07-feb-2012 16:54:16 1013321 02-mar-2012 18:36:20

BS Key Size Device Type Elapsed Time Completion Time

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

8 10.00M DISK 00:00:01 02-mar-2012 18:36:22

BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20120302T183621

Piece Name: /u01/dgp/backup/Backup_0rn4sp15_1_1

List of Archived Logs in backup set 8

Thrd Seq Low SCN Low Time Next SCN Next Time

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

1 41 1010041 07-feb-2012 16:40:19 1010398 07-feb-2012 16:49:18

1 42 1010398 07-feb-2012 16:49:18 1011700 07-feb-2012 16:54:16

BS Key Size Device Type Elapsed Time Completion Time

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

11 4.50K DISK 00:00:00 02-mar-2012 18:37:28

BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20120302T183728

Piece Name: /u01/dgp/backup/Backup_0vn4sp38_1_1

List of Archived Logs in backup set 11

Thrd Seq Low SCN Low Time Next SCN Next Time

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

1 44 1013321 02-mar-2012 18:36:20 1013361 02-mar-2012 18:37:28


5) Duplicate

TESTDGD:DGD:/u01/dgd/backup->rman auxiliary /

Recovery Manager: Release 11.2.0.1.0 - Production on Fri Mar 2 19:55:49 2012

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

connected to auxiliary database: DGD (not mounted)

RMAN> run

{

allocate auxiliary channel DUP1 type disk;

allocate auxiliary channel DUP2 type disk;

duplicate target database to DGD until time "to_date('03/02/2012 18:35:00','mm/dd/yy hh24:mi:ss')" backup location '/u01/dgd/backup';

}2> 3> 4> 5> 6>

allocated channel: DUP1

channel DUP1: SID=20 device type=DISK

allocated channel: DUP2

channel DUP2: SID=21 device type=DISK

Starting Duplicate Db at 02-MAR-12

contents of Memory Script:

{

sql clone "create spfile from memory";

}

executing Memory Script

sql statement: create spfile from memory

contents of Memory Script:

{

shutdown clone immediate;

startup clone nomount;

}

executing Memory Script

Oracle instance shut down

connected to auxiliary database (not started)

Oracle instance started

Total System Global Area 263049216 bytes

Fixed Size 2212448 bytes

Variable Size 209718688 bytes

Database Buffers 46137344 bytes

Redo Buffers 4980736 bytes

allocated channel: DUP1

channel DUP1: SID=18 device type=DISK

allocated channel: DUP2

channel DUP2: SID=19 device type=DISK

contents of Memory Script:

{

sql clone "alter system set db_name =

''DGP'' comment=

''Modified by RMAN duplicate'' scope=spfile";

sql clone "alter system set db_unique_name =

''DGD'' comment=

''Modified by RMAN duplicate'' scope=spfile";

shutdown clone immediate;

startup clone force nomount

restore clone primary controlfile from '/u01/dgd/backup/CONTROL_c-1579930627-20120207-00';

alter clone database mount;

}

executing Memory Script

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

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

Oracle instance shut down

Oracle instance started

Total System Global Area 263049216 bytes

Fixed Size 2212448 bytes

Variable Size 209718688 bytes

Database Buffers 46137344 bytes

Redo Buffers 4980736 bytes

allocated channel: DUP1

channel DUP1: SID=18 device type=DISK

allocated channel: DUP2

channel DUP2: SID=19 device type=DISK

Starting restore at 02-MAR-12

channel DUP2: skipped, AUTOBACKUP already found

channel DUP1: restoring control file

channel DUP1: restore complete, elapsed time: 00:00:09

output file name=/u01/dgd/control/control01.ctl

output file name=/u01/dgd/control/control02.ctl

Finished restore at 02-MAR-12

database mounted

contents of Memory Script:

{

set until scn 1010006;

set newname for datafile 1 to

"/u01/dgd/data/system01.dbf";

set newname for datafile 2 to

"/u01/dgd/data/sysaux01.dbf";

set newname for datafile 3 to

"/u01/dgd/data/undotbs01.dbf";

set newname for datafile 4 to

"/u01/dgd/data/users01.dbf";

set newname for datafile 5 to

"/u01/dgd/data/TEST.dbf";

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

Starting restore at 02-MAR-12

channel DUP1: starting datafile backup set restore

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

channel DUP1: restoring datafile 00001 to /u01/dgd/data/system01.dbf

channel DUP1: restoring datafile 00005 to /u01/dgd/data/TEST.dbf

channel DUP1: reading from backup piece /u01/dgd/backup/Backup_0nn2o0di_1_1

channel DUP2: starting datafile backup set restore

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

channel DUP2: restoring datafile 00002 to /u01/dgd/data/sysaux01.dbf

channel DUP2: restoring datafile 00003 to /u01/dgd/data/undotbs01.dbf

channel DUP2: restoring datafile 00004 to /u01/dgd/data/users01.dbf

channel DUP2: reading from backup piece /u01/dgd/backup/Backup_0on2o0di_1_1

channel DUP2: piece handle=/u01/dgd/backup/Backup_0on2o0di_1_1 tag=TAG20120207T163913

channel DUP2: restored backup piece 1

channel DUP2: restore complete, elapsed time: 00:01:06

channel DUP1: piece handle=/u01/dgd/backup/Backup_0nn2o0di_1_1 tag=TAG20120207T163913

channel DUP1: restored backup piece 1

channel DUP1: restore complete, elapsed time: 00:01:20

Finished restore at 02-MAR-12

contents of Memory Script:

{

switch clone datafile all;

}

executing Memory Script

datafile 1 switched to datafile copy

input datafile copy RECID=6 STAMP=776895801 file name=/u01/dgd/data/system01.dbf

datafile 2 switched to datafile copy

input datafile copy RECID=7 STAMP=776895801 file name=/u01/dgd/data/sysaux01.dbf

datafile 3 switched to datafile copy

input datafile copy RECID=8 STAMP=776895801 file name=/u01/dgd/data/undotbs01.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=9 STAMP=776895801 file name=/u01/dgd/data/users01.dbf

datafile 5 switched to datafile copy

input datafile copy RECID=10 STAMP=776895801 file name=/u01/dgd/data/TEST.dbf

contents of Memory Script:

{

set until time "to_date('03/02/2012 18:35:00','mm/dd/yy hh24:mi:ss')";

recover

clone database

delete archivelog

;

}

executing Memory Script

executing command: SET until clause

Starting recover at 02-MAR-12

starting media recovery

channel DUP1: starting archived log restore to default destination

channel DUP1: restoring archived log

archived log thread=1 sequence=40

channel DUP1: reading from backup piece /u01/dgd/backup/Backup_0pn2o0fj_1_1

channel DUP2: starting archived log restore to default destination

channel DUP2: restoring archived log

archived log thread=1 sequence=41

channel DUP2: restoring archived log

archived log thread=1 sequence=42

channel DUP2: reading from backup piece /u01/dgd/backup/Backup_0rn4sp15_1_1

channel DUP1: piece handle=/u01/dgd/backup/Backup_0pn2o0fj_1_1 tag=TAG20120207T164019

channel DUP1: restored backup piece 1

channel DUP1: restore complete, elapsed time: 00:00:01

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_40_7o2wnclz_.arc thread=1 sequence=40

channel clone_default: deleting archived log(s)

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_40_7o2wnclz_.arc RECID=1 STAMP=776895803

channel DUP1: starting archived log restore to default destination

channel DUP1: restoring archived log

archived log thread=1 sequence=43

channel DUP1: reading from backup piece /u01/dgd/backup/Backup_0sn4sp15_1_1

channel DUP2: piece handle=/u01/dgd/backup/Backup_0rn4sp15_1_1 tag=TAG20120302T183621

channel DUP2: restored backup piece 1

channel DUP2: restore complete, elapsed time: 00:00:02

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_41_7o2wnclo_.arc thread=1 sequence=41

channel clone_default: deleting archived log(s)

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_41_7o2wnclo_.arc RECID=2 STAMP=776895804

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_42_7o2wncnw_.arc thread=1 sequence=42

channel clone_default: deleting archived log(s)

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_42_7o2wncnw_.arc RECID=3 STAMP=776895804

channel DUP1: piece handle=/u01/dgd/backup/Backup_0sn4sp15_1_1 tag=TAG20120302T183621

channel DUP1: restored backup piece 1

channel DUP1: restore complete, elapsed time: 00:00:10

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_43_7o2wnfmf_.arc thread=1 sequence=43

channel clone_default: deleting archived log(s)

archived log file name=/u01/dgd/backup/DGD/archivelog/2012_03_02/o1_mf_1_43_7o2wnfmf_.arc RECID=4 STAMP=776895805

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

Finished recover at 02-MAR-12

contents of Memory Script:

{

shutdown clone immediate;

startup clone nomount;

sql clone "alter system set db_name =

''DGD'' 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 263049216 bytes

Fixed Size 2212448 bytes

Variable Size 209718688 bytes

Database Buffers 46137344 bytes

Redo Buffers 4980736 bytes

allocated channel: DUP1

channel DUP1: SID=18 device type=DISK

allocated channel: DUP2

channel DUP2: SID=19 device type=DISK

sql statement: alter system set db_name = ''DGD'' 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 263049216 bytes

Fixed Size 2212448 bytes

Variable Size 209718688 bytes

Database Buffers 46137344 bytes

Redo Buffers 4980736 bytes

allocated channel: DUP1

channel DUP1: SID=18 device type=DISK

allocated channel: DUP2

channel DUP2: SID=19 device type=DISK

sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DGD" RESETLOGS ARCHIVELOG

MAXLOGFILES 16

MAXLOGMEMBERS 3

MAXDATAFILES 100

MAXINSTANCES 8

MAXLOGHISTORY 292

LOGFILE

GROUP 1 ( '/u01/dgd/redo/redo01.log' ) SIZE 5 M REUSE,

GROUP 2 ( '/u01/dgd/redo/redo02.log' ) SIZE 5 M REUSE,

GROUP 3 ( '/u01/dgd/redo/redo03.log' ) SIZE 5 M REUSE

DATAFILE

'/u01/dgd/data/system01.dbf'

CHARACTER SET WE8MSWIN1252

contents of Memory Script:

{

set newname for tempfile 1 to

"/u01/dgd/data/temp01.dbf";

switch clone tempfile all;

catalog clone datafilecopy "/u01/dgd/data/sysaux01.dbf",

"/u01/dgd/data/undotbs01.dbf",

"/u01/dgd/data/users01.dbf",

"/u01/dgd/data/TEST.dbf";

switch clone datafile all;

}

executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/dgd/data/temp01.dbf in control file

cataloged datafile copy

datafile copy file name=/u01/dgd/data/sysaux01.dbf RECID=1 STAMP=776895859

cataloged datafile copy

datafile copy file name=/u01/dgd/data/undotbs01.dbf RECID=2 STAMP=776895859

cataloged datafile copy

datafile copy file name=/u01/dgd/data/users01.dbf RECID=3 STAMP=776895859

cataloged datafile copy

datafile copy file name=/u01/dgd/data/TEST.dbf RECID=4 STAMP=776895859

datafile 2 switched to datafile copy

input datafile copy RECID=1 STAMP=776895859 file name=/u01/dgd/data/sysaux01.dbf

datafile 3 switched to datafile copy

input datafile copy RECID=2 STAMP=776895859 file name=/u01/dgd/data/undotbs01.dbf

datafile 4 switched to datafile copy

input datafile copy RECID=3 STAMP=776895859 file name=/u01/dgd/data/users01.dbf

datafile 5 switched to datafile copy

input datafile copy RECID=4 STAMP=776895859 file name=/u01/dgd/data/TEST.dbf

contents of Memory Script:

{

Alter clone database open resetlogs;

}

executing Memory Script

database opened

Finished Duplicate Db at 02-MAR-12

released channel: DUP1

released channel: DUP2


NOTE:

• log_file_name_convert=('dgp','dgd') is not allowed by Rman
• until SCN Clause is not allowed by RMAN.
• if no log_file_name_convert found than Oracle will create Redo into backup location /BACKUP_LOCATION/DB_NAME/onlinelog/

No comments:

Post a Comment