Knowledge Base : Duplicate database with RMAN

Using Enterprise Manager to duplicate databases with RMAN

Kennwortdatei wurde erfolgreich erstellt
Instanzname erfolgreich in oratab hinzugefügt.
Server Parameter File erfolgreich erstellt
Konfiguration abgeschlossen.

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Sep 7 16:00:55 2014

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

RMAN> 
connected to target database: PCERA (DBID=2671027734)
using target database control file instead of recovery catalog

RMAN> 
connected to auxiliary database: CERAUTF8 (not mounted)

RMAN> 
echo set on


RMAN> run {
2> allocate auxiliary channel oem_restore_disk_0 type disk;
3> allocate auxiliary channel oem_restore_disk_1 type disk;
4> allocate auxiliary channel oem_restore_disk_2 type disk;
5> allocate auxiliary channel oem_restore_disk_3 type disk;
6> duplicate target database to 'cerautf8'; 
7>  }
allocated channel: oem_restore_disk_0
channel oem_restore_disk_0: SID=156 device type=DISK

allocated channel: oem_restore_disk_1
channel oem_restore_disk_1: SID=310 device type=DISK

allocated channel: oem_restore_disk_2
channel oem_restore_disk_2: SID=463 device type=DISK

allocated channel: oem_restore_disk_3
channel oem_restore_disk_3: SID=616 device type=DISK

Starting Duplicate Db at 07-SEP-14

contents of Memory Script:
{
   sql clone "alter system set  control_files = 
  ''+DATA/cerautf8/controlfile/current.497.857664061'', ''+RECO/cerautf8/controlfile/current.485.857664061'' comment=
 ''Set by RMAN'' scope=spfile";
   sql clone "alter system set  db_name = 
 ''PCERA'' comment=
 ''Modified by RMAN duplicate'' scope=spfile";
   sql clone "alter system set  db_unique_name = 
 ''CERAUTF8'' 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  control_files =   ''+DATA/cerautf8/controlfile/current.497.857664061'', ''+RECO/cerautf8/controlfile/current.485.857664061'' comment= ''Set by RMAN'' scope=spfile

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

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

Oracle instance shut down

Oracle instance started

Total System Global Area    4275781632 bytes

Fixed Size                     2260088 bytes
Variable Size                805307272 bytes
Database Buffers            3422552064 bytes
Redo Buffers                  45662208 bytes
allocated channel: oem_restore_disk_0
channel oem_restore_disk_0: SID=769 device type=DISK
allocated channel: oem_restore_disk_1
channel oem_restore_disk_1: SID=922 device type=DISK
allocated channel: oem_restore_disk_2
channel oem_restore_disk_2: SID=1072 device type=DISK
allocated channel: oem_restore_disk_3
channel oem_restore_disk_3: SID=4 device type=DISK

Starting restore at 07-SEP-14

channel oem_restore_disk_0: starting datafile backup set restore
channel oem_restore_disk_0: restoring control file
channel oem_restore_disk_0: reading from backup piece +RECO/pcera/autobackup/2014_09_07/s_857611484.491.857611485
channel oem_restore_disk_0: piece handle=+RECO/pcera/autobackup/2014_09_07/s_857611484.491.857611485 tag=TAG20140907T012444
channel oem_restore_disk_0: restored backup piece 1
channel oem_restore_disk_0: restore complete, elapsed time: 00:00:03
output file name=+DATA/cerautf8/controlfile/current.497.857664061
output file name=+RECO/cerautf8/controlfile/current.485.857664061
Finished restore at 07-SEP-14

database mounted

contents of Memory Script:
{
   set until scn  28491428539;
   set newname for clone datafile  1 to new;
   ...
   set newname for clone datafile  296 to new;
   restore
   clone database
   ;
}
executing Memory Script

executing command: SET until clause

executing command: SET NEWNAME

Starting restore at 07-SEP-14

channel oem_restore_disk_0: starting datafile backup set restore
...