Create a duplicate database on the same host

Source: Internet
Author: User

Rman> duplicate target database to dupdb; Starting Duplicate Db at 25-jun-2015 08:18:24using target database control file instead of recovery catalogallocated Chann El:ora_aux_disk_1channel ora_aux_disk_1:sid=396 device type=diskcontents of Memory script:{SQL clone "Create SPFile F Rom Memory ";}   Executing memory scriptsql statement:create SPFile from memorycontents of memory script:{shutdown clone immediate; Startup clone Nomount;} Executing Memory scriptoracle instance shut downconnected to auxiliary database (not started) Oracle instance Startedtotal System Global area 321548288 bytesfixed size 2252824 bytesvariable size 264245224 b   Ytesdatabase buffers 50331648 Bytesredo buffers 4718592 bytescontents of Memory script:{   SQL Clone "alter system set db_name = ' DBTEST ' comment=" Modified by RMAN duplicate ' scope=spfile '; SQL Clone "alter system set Db_unique_name = ' dupdb '" comment= "Modified by RMan duplicate ' scope=spfile ';   Shutdown clone Immediate;   Startup clone Force Nomount restore clone primary controlfile; Alter clone database Mount;} Executing Memory scriptsql statement:alter system Set db_name = ' DBTEST ' comment= ' Modified by RMAN duplicate ' SCOP E=spfilesql statement:alter System Set Db_unique_name = ' dupdb ' comment= ' Modified by RMAN duplicate ' Scope=spfileo                     Racle instance shut downoracle instance startedtotal System Global area 321548288 bytesfixed Size                   2252824 bytesvariable Size 264245224 bytesdatabase buffers 50331648 Bytesredo buffers 4718592 bytesstarting Restore at 25-jun-2015 08:18:40allocated Channel:ora_aux_disk_1channel ora_aux_disk_1:si d=396 device Type=diskchannel ora_aux_disk_1:starting datafile backup set Restorechannel ora_aux_disk_1:restoring contr OL FileChannel ora_aux_disk_1:reading from backup piece/u01/app/oracle/fast_recovery_area/dbtest/autobackup/2015_06_25/o1_mf_s_883287663_brp8zhvt_.bkpchannel ora_aux_disk_1:piece handle=/u01/app/oracle/fast_recovery_area/ DBTEST/AUTOBACKUP/2015_06_25/O1_MF_S_883287663_BRP8ZHVT_.BKP Tag=tag20150625t054103channel ORA_AUX_DISK_1: Restored backup piece 1channel ora_aux_disk_1:restore complete, elapsed time:00:00:01output file name=/u01/app/oracle/o Radata/dupdb/control01.ctloutput file name=/u01/app/oracle/oradata/dupdb/control02.ctlfinished Restore at 25-   JUN-2015 08:18:41database mountedcontents of Memory script:{set until SCN 1553917;   SQL clone ' ALTER DATABASE flashback off ';   Set newname for datafile 1 to "/u01/app/oracle/oradata/dupdb/system01.dbf";   Set newname for datafile 2 to "/u01/app/oracle/oradata/dupdb/sysaux01.dbf";   Set newname for DataFile 3 to "/u01/app/oracle/oradata/dupdb/undotbs01.dbf";   Set newname for datafile 4 to "/u01/app/oracle/oradata/dupdb/users01.dbf";   Set newname for datafile 5 to "/u01/app/oracle/oradata/dupdb/example01.dbf"; Set newname for DaTafile 6 to "/u01/app/oracle/oradata/dupdb/nnc_data01.dbf";   Set newname for datafile 7 to "/U01/APP/ORACLE/ORADATA/DUPDB/NNC_DATA02.DBF";   Set newname for DataFile 8 to "/u01/app/oracle/oradata/dupdb/nnc_data03.dbf";   Set newname for DataFile 9 to "/u01/app/oracle/oradata/dupdb/nnc_index01.dbf";   Set newname for DataFile "/U01/APP/ORACLE/ORADATA/DUPDB/NNC_INDEX02.DBF";   Set newname for datafile one to "/u01/app/oracle/oradata/dupdb/nnc_index03.dbf"; Restore clone database;} Executing Memory scriptexecuting command:set until clausesql statement:alter database flashback offexecuting Command:se T newnameexecuting command:set newnameexecuting command:set newnameexecuting command:set NEWNAMEexecuting command:set Newnameexecuting command:set newnameexecuting command:set newnameexecuting command:set NEWNAMEexecuting command:set NE Wnameexecuting command:set newnameexecuting command:set newnamestarting restore at 25-jun-2015 08:18:46using channel ORA _aux_disk_1channel ora_aux_disk_1:starting datafile Backup set Restorechannel ora_aux_disk_1:specifying datafile (s) to rest Ore from backup Setchannel ora_aux_disk_1:restoring datafile 00001 to/u01/app/oracle/oradata/dupdb/ System01.dbfchannel ora_aux_disk_1:restoring datafile 00002 to/u01/app/oracle/oradata/dupdb/sysaux01.dbfchannel ORA _aux_disk_1:restoring datafile 00003 To/u01/app/oracle/oradata/dupdb/undotbs01.dbfchannel ora_aux_disk_1:restoring DataFile 00004 to/u01/app/oracle/oradata/dupdb/users01.dbfchannel ora_aux_disk_1:restoring datafile 00005 To/u01/app /oracle/oradata/dupdb/example01.dbfchannel ora_aux_disk_1:restoring datafile 00006 to/u01/app/oracle/oradata/dupdb /nnc_data01.dbfchannel ora_aux_disk_1:restoring datafile 00007 to/u01/app/oracle/oradata/dupdb/nnc_ Data02.dbfchannel ora_aux_disk_1:restoring datafile 00008 to/u01/app/oracle/oradata/dupdb/nnc_data03.dbfchannel ORA _aux_disk_1:restoring datafile 00009 To/u01/app/oracle/oradata/dupdb/nnc_index01.dbfchanNel ora_aux_disk_1:restoring datafile 00010 to/u01/app/oracle/oradata/dupdb/nnc_index02.dbfchannel ORA_AUX_DISK_1: restoring datafile 00011 to/u01/app/oracle/oradata/dupdb/nnc_index03.dbfchannel ora_aux_disk_1:reading from backup Piece/home/oracle/arch/dbbak_0tqabpiv_1_1channel ora_aux_disk_1:piece handle=/home/oracle/arch/dbbak_0tqabpiv_1_ 1 Tag=tag20150625t054047channel ora_aux_disk_1:restored backup piece 1channel ora_aux_disk_1:restore complete, elapsed time:00:00:25finished Restore at 25-jun-2015 08:19:11contents for Memory script:{switch clone datafile all;} Executing Memory scriptdatafile 1 switched to datafile copyinput datafile copy recid=13 stamp=883297151 file Name=/u01/app /oracle/oradata/dupdb/system01.dbfdatafile 2 switched to datafile copyinput datafile copy RECID=14 STAMP=883297151 file n Ame=/u01/app/oracle/oradata/dupdb/sysaux01.dbfdatafile 3 switched to datafile copyinput datafile copy RECID=15 STAMP= 883297151 file name=/u01/app/oracle/oradata/dupdb/undotbs01.Dbfdatafile 4 switched to datafile copyinput datafile copy recid=16 stamp=883297151 file name=/u01/app/oracle/oradata/dup Db/users01.dbfdatafile 5 switched to datafile copyinput datafile copy recid=17 stamp=883297151 file name=/u01/app/oracle/ Oradata/dupdb/example01.dbfdatafile 6 switched to datafile copyinput datafile copy recid=18 STAMP=883297151 file name=/u0 1/app/oracle/oradata/dupdb/nnc_data01.dbfdatafile 7 switched to datafile copyinput datafile copy RECID=19 STAMP= 883297151 file Name=/u01/app/oracle/oradata/dupdb/nnc_data02.dbfdatafile 8 switched to datafile copyinput datafile copy recid=20 stamp=883297151 file Name=/u01/app/oracle/oradata/dupdb/nnc_data03.dbfdatafile 9 switched to DataFile Copyinput datafile Copy recid=21 stamp=883297151 file Name=/u01/app/oracle/oradata/dupdb/nnc_index01.dbfdatafile 10 Switched to datafile copyinput datafile copy recid=22 stamp=883297151 file name=/u01/app/oracle/oradata/dupdb/nnc_ Index02.dbfdatafile switched to datafile copyinput datafile Copy recid=23 stamp=883297151 file name=/u01/app/oracle/oradata/dupdb/nnc_index03.dbfcontents of Memory Script:{set unt   Il scn 1553917; Recover clone database Delete Archivelog;} Executing Memory scriptexecuting command:set until clausestarting recover at 25-jun-2015 08:19:11using channel Ora_aux_di Sk_1starting Media recoveryarchived Log for thread 1 with sequence are already on disk as file/home/oracle/arch/1_10_88 3118265.dbfarchived log for thread 1 with sequence one already on disk as File/home/oracle/arch/1_11_883118265.dbfarchi Ved log file name=/home/oracle/arch/1_10_883118265.dbf thread=1 sequence=10archived log file name=/home/oracle/arch/1_ 11_883118265.DBF thread=1 sequence=11media Recovery complete, elapsed time:00:00:01finished recover at 25-jun-2015 08:19  : 13Oracle instance startedtotal System Global area 321548288 bytesfixed Size 2252824 bytesvariable Size 264245224 bytesdatabase buffers 50331648 bytesredo buffers 4718592 bytescontents of Memory script:{SQL clone "alter system set db_name = ' dupdb ' C   Omment= ' 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 scriptsql statement:alter system Set db_name = ' dupdb ' comment= ' Reset to original value by RMAN ' Scope=spfilesql statement:alter System Reset db_unique_name scope=spfileoracle instance shut downconnected to auxiliary Database (not started) Oracle instance startedtotal System Global area 321548288 bytesfixed Size 22                   52824 bytesvariable Size 264245224 bytesdatabase buffers 50331648 Bytesredo buffers 4718592 bytessql statement:create controlfile reuse SET DATABASE "dupdb" Resetlogs ARCHIVELOG maxlogfiles 1 6 Maxlogmembers 3 Maxdatafiles maxinstances 8 maxloghistory 292 LOGfile Group 1 ('/u01/app/oracle/oradata/dupdb/redo01.log ') SIZE M Reuse, Group 2 ('/u01/app/oracle/oradata/du Pdb/redo02.log ') size M reuse, GROUP 3 ('/u01/app/oracle/oradata/dupdb/redo03.log ') size m reuse datafile '  /U01/APP/ORACLE/ORADATA/DUPDB/SYSTEM01.DBF ' CHARACTER set zhs16gbkcontents of Memory script:{set newname for Tempfile   1 to "/u01/app/oracle/oradata/dupdb/temp01.dbf";   Switch clone tempfile all; Catalog Clone datafilecopy "/U01/APP/ORACLE/ORADATA/DUPDB/SYSAUX01.DBF", "/u01/app/oracle/oradata/dupdb/ Undotbs01.dbf ","/u01/app/oracle/oradata/dupdb/users01.dbf ","/u01/app/oracle/oradata/dupdb/example01.dbf ","/u01 /app/oracle/oradata/dupdb/nnc_data01.dbf ","/u01/app/oracle/oradata/dupdb/nnc_data02.dbf ","/u01/app/oracle/ Oradata/dupdb/nnc_data03.dbf ","/u01/app/oracle/oradata/dupdb/nnc_index01.dbf ","/u01/app/oracle/oradata/dupdb/   Nnc_index02.dbf ","/u01/app/oracle/oradata/dupdb/nnc_index03.dbf "; Switch clone datafile all;} Executing MEmory scriptexecuting Command:set newnamerenamed tempfile 1 to/u01/app/oracle/oradata/dupdb/temp01.dbf in control Filec ataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/sysaux01.dbf RECID=1 STAMP= 883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/undotbs01.dbf recid=2 STAMP= 883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/users01.dbf recid=3 stamp= 883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/example01.dbf recid=4 STAMP= 883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/nnc_data01.dbf recid=5 STAMP= 883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/nnc_data02.dbf recid=6 STAMP= 883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/nnc_data03.dbf recid=7 STAMP= 883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/nnc_iNDEX01.DBF recid=8 stamp=883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/nnc_ INDEX02.DBF recid=9 stamp=883297164cataloged datafile copydatafile Copy file name=/u01/app/oracle/oradata/dupdb/nnc_ INDEX03.DBF recid=10 stamp=883297164datafile 2 switched to datafile copyinput datafile copy RECID=1 STAMP=883297164 file n Ame=/u01/app/oracle/oradata/dupdb/sysaux01.dbfdatafile 3 switched to datafile copyinput datafile copy RECID=2 STAMP= 883297164 file Name=/u01/app/oracle/oradata/dupdb/undotbs01.dbfdatafile 4 switched to datafile copyinput datafile copy recid=3 stamp=883297164 file Name=/u01/app/oracle/oradata/dupdb/users01.dbfdatafile 5 switched to datafile Copyinput DataFile copy recid=4 stamp=883297164 file Name=/u01/app/oracle/oradata/dupdb/example01.dbfdatafile 6 switched to datafile copyinput datafile Copy recid=5 stamp=883297164 file name=/u01/app/oracle/oradata/dupdb/nnc_ Data01.dbfdatafile 7 switched to datafile copyinput datafile copy recid=6 stamp=883297164 file Name=/u01/app/oracle/oradata/dupdb/nnc_data02.dbfdatafile 8 switched to datafile copyinput datafile copy recid=7 stamp=883297164 file Name=/u01/app/oracle/oradata/dupdb/nnc_data03.dbfdatafile 9 switched to DataFile Copyinput datafile Copy recid=8 stamp=883297164 file Name=/u01/app/oracle/oradata/dupdb/nnc_index01.dbfdatafile 10 Switched to datafile copyinput datafile copy recid=9 stamp=883297164 file name=/u01/app/oracle/oradata/dupdb/nnc_ Index02.dbfdatafile switched to datafile copyinput datafile copy recid=10 stamp=883297164 file name=/u01/app/oracle/or Adata/dupdb/nnc_index03.dbfcontents of Memory script:{Alter clone database open resetlogs;}  Executing Memory scriptdatabase openedfinished Duplicate Db at 25-jun-2015 08:19:28rman>

Create a duplicate database on the same host

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.