Thursday, March 29, 2012

ORA-19870, ORA-19507, ORA-27029, ORA-19511 : Error received from media manager layer

Links to this post
run
{
ALLOCATE CHANNEL ch0 DEVICE TYPE 'SBT_TAPE' PARMS 'ENV=(NB_ORA_CLIENT=SERVERNAME.com,
NB_ORA_POLICY=,
NB_ORA_SERV=MASTER_BACKUPSERVER.com)';
RESTORE controlfile from 'c-2440775812-20120222-00';
}


using target database control file instead of recovery catalog
allocated channel: ch0
channel ch0: sid=427 devtype=SBT_TAPE
channel ch0: Veritas NetBackup for Oracle - Release 6.5 (2010042404)

Starting restore at 07-MAR-12

channel ch0: restoring control file
released channel: ch0
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/07/2012 12:25:51
ORA-19870: error reading backup piece c-2440775812-20120222-00
ORA-19507: failed to retrieve sequential file, handle="c-2440775812-20120222-00", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
--see the text here --


Cause      No.   Message                                       
sbtopen   7000 Backup file not found (only returned for read)
          7001 File exists (only returned for write)         
          7002* Bad mode specified                            
          7003 Invalid block size specified                  
          7004 No tape device found                          
          7005 Device found, but busy; try again later       
          7006 Tape volume not found                         
          7007 Tape volume is in-use                         
          7008 I/O Error                                     
          7012* Invalid argument(s) to sbtopen                
sbtclose   7020* Invalid file handle or file not open          
          7021* Invalid flags to sbtclose                     
          7022 I/O error                                     
          7023 O/S error                                     
          7024* Invalid argument(s) to sbtclose               
          7025 Can't connect with Media Manager              
sbtwrite   7040* Invalid file handle or file not open          
          7041 End of volume reached                         
          7042 I/O error                                     
          7043 O/S error                                     
          7044* Invalid argument(s) to sbtwrite               
sbtread   7060* Invalid file handle or file not open          
          7061 EOF encountered                               
          7062 End of volume reached                         
          7063 I/O error                                     
          7064 O/S error                                     
          7065* Invalid argument(s) to sbtread                
sbtremove  7080 Backup file not found                         
          7081 Backup file in use                            
          7082 I/O Error                                     
          7083 Can't connect with Media Manager              
          7084 Permission denied                             
          7085 O/S error                                     
          7086* Invalid argument(s) to sbtremove              
sbtinfo   7090 Backup file not found                         
          7091 I/O Error                                     
          7092 Can't connect with Media Manager              
          7093 Permission denied                             
          7094 O/S error                                     
          7095* Invalid argument(s) to sbtinfo                
sbtinit   7110* Invalid argument(s) to sbtinit                
          7111 O/S error                                     


-check content of /usr/openv/netbackup/bp.conf


SERVER = masterserver.com
SERVER = devserver.com
SERVER = prodserver.com
EMMSERVER = masterserver.com
CLIENT_NAME = devserver.com
CLIENT_NAME = prodserver.com


THINGS TO CHECK

1) check link between Oracle and Netbackup.
lrwxr-xr-x   1 oracle     dba             36 Mar  7  2011 libobk.sl -> /usr/openv/netbackup/bin/libobk.sl64

Below are the API library for different Platform.

NetBackup API libraries

Platform        Oracle    Library Name     
AIX             32-bit    libobk.a              
AIX             64-bit    libobk.a64            
HP-UX           32-bit    libobk.sl           
HP-UX           64-bit    libobk.sl64         
IRIX            64-bit    libobk.so64          
Linux           32-bit    libobk.so           
Linux           64-bit    libobk.so64         
Linux Itanium   64-bit    libobk.so   
IBM pSeries     64-bit    libobk.so     
Solaris(SPARC)  32-bit    libobk.so.1                  
Solaris (SPARC) 64-bit    libobk.so64.1
Tru64           64-bit    libobk.so.1            

1 Use RMAN to make a backup directly to disk. Do not use NetBackup.
2 Use RMAN with NetBackup to create a backup.
3 Check the /usr/openv/netbackup/logs/dbclient directory permissions. They should be set to 777.
4 Look for a log file in /usr/openv/netbackup/logs/dbclient
If no log file exists, libobk is not linked into Oracle properly.

Note: you dont need to shutdown all instances.
You can create softlink without shutting down Database.
ln -s /usr/openv/netbackup/bin/libobk.sl64 /u01/app/oracle/product/10.2.0.3.0_1/lib/libobk.sl

if you want to create softlink safely , execute /usr/openv/netbackup/bin/oracle_link as below.

/usr/openv/netbackup->/usr/openv/netbackup/bin/oracle_link
Fri Mar 23 16:26:48 EDT 2012
All Oracle instances should be shutdown before running this script.

Please log into the Unix system as the Oracle owner for running this script

Do you want to continue? (y/n) [n] y


LIBOBK path: /usr/openv/netbackup/bin
ORACLE_HOME: /u01/app/oracle/product/10.2.0.3.0_1
Oracle version: 10.2.0.3.0
Linking LIBOBK (64 bits):
Moving libobk.sl to libobk.sl.back
ln -s /usr/openv/netbackup/bin/libobk.sl64 /u01/app/oracle/product/10.2.0.3.0_1/lib/libobk.sl
Done

Please check the trace file located in /tmp/make_trace.18515
to make sure the linking process was successful.



2) Check using sbttest.

(ncsci012):dncryp:/u01/app/oracle/product/10.2.0.3.0_1/dbs->sbttest mml.tst
The sbt function pointers are loaded from libobk.sl library.
-- sbtinit succeeded
-- sbtinit (2nd time) succeeded
sbtinit: Media manager supports SBT API version 2.0
sbtinit: Media manager is version 5.0.0.0
sbtinit: vendor description string=Veritas NetBackup for Oracle - Release 6.5 (2010042404)
sbtinit: allocated sbt context area of 8 bytes
sbtinit: proxy copy is supported
-- sbtinit2 succeeded
-- regular_backup_restore starts ................................
MMAPI error from sbtbackup: 7501, VxBSACreateObject: Failed with error:
   Server Status:  Communication with the server has not been initiated or the server status has not been retrieved from the serve
-- sbtbackup failed


% sbttest
The program displays the list of possible arguments for the program:

Error: backup file name must be specified
Usage: sbttest backup_file_name # this is the only required parameter
               <-dbname database_name>
               <-trace trace_file_name>
               <-remove_before>
               <-no_remove_after> 
               <-read_only>
               <-no_regular_backup_restore>
               <-no_proxy_backup>
               <-no_proxy_restore>
               <-file_type n>
               <-copy_number n>
               <-media_pool n>
               <-os_res_size n>
               <-pl_res_size n>
               <-block_size block_size> 
               <-block_count block_count>
               <-proxy_file os_file_name bk_file_name 
               [os_res_size pl_res_size block_size block_count]>
               <-libname sbt_library_name>


3) Read More into logfiles.
/usr/openv/netbackup/logs/dbclient

4) check below directory and files
/opt/openv/netbackup/db/altnames/No.Restrictions

Sunday, March 25, 2012

11gR2 backup-based DUPLICATE / Duplicate from Backup Location

Links to this post

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/