Use rman duplicate to clone the output of Oracle10g R2 Database

Source: Internet
Author: User

The output of this command shows that the duplicate command of Oracle RMAN is executed internally and has a deeper understanding of cloning.
For demonstration of the previous steps, see:
Http://andylhz2009.blog.51cto.com/728703/771481
 
C: \ oracle \ product \ 10.2.0 \ client_1 \ BIN> rman target sys/password @ DGP
 
 
Recovery MANAGER: Release 10.2.0.1.0-Production on Tuesday January 31 00:59:06 2012
 
Copyright (c) 1982,200 5, Oracle. All rights reserved.
 
Connect to the target database: DG (DBID = 1686618574)
 
RMAN> connect auxiliary sys/password @ DGS
 
Connected to secondary Database: DGC (not loaded)
 
RMAN> duplicate target database to dgc;
 
Start Duplicate Db from month 1 to Month 12
Use the target database control file to replace the recovery directory
Allocated channel: ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: sid = 155 devtype = DISK
 
Memory script content:
{
Set until scn 526998;
Set newname for datafile 1
"/U01/app/oracle/oradata/dgc/system01.dbf ";
Set newname for datafile 2
"/U01/app/oracle/oradata/dgc/undotbs01.dbf ";
Set newname for datafile 3
"/U01/app/oracle/oradata/dgc/sysaux01.dbf ";
Set newname for datafile 4
"/U01/app/oracle/oradata/dgc/users01.dbf ";
Restore
Check readonly
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
 
Start restore from month 1 to Month 12
Use channel ORA_AUX_DISK_1
 
Channel ORA_AUX_DISK_1: recovering the data file backup set
Channel ORA_AUX_DISK_1: Specifies the data file to be recovered from the backup set.
Restoring data file 00001 to/u01/app/oracle/oradata/dgc/system01.dbf
Restoring data file 00002 to/u01/app/oracle/oradata/dgc/undotbs01.dbf
Restoring data file 00003 to/u01/app/oracle/oradata/dgc/sysaux01.dbf
Restoring data file 00004 to/u01/app/oracle/oradata/dgc/users01.dbf
Channel ORA_AUX_DISK_1: Reading the backup segment/home/oracle/all_DG_2.bak
Channel ORA_AUX_DISK_1: recovered backup segment 1
Segment handle =/home/oracle/all_DG_2.bak mark = TAG20120125T110557
Channel ORA_AUX_DISK_1: Recovery completed, time: 00:00:54
The restore is completed from month 1 to Month 12.
SQL statement: CREATE CONTROLFILE REUSE SET DATABASE "DGC" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1 ('/u01/app/oracle/oradata/dgc/redo01.log') SIZE 50 m reuse,
GROUP 2 ('/u01/app/oracle/oradata/dgc/redo02.log') SIZE 50 m reuse,
GROUP 3 ('/u01/app/oracle/oradata/dgc/redo03.log') SIZE 50 M REUSE
DATAFILE
'/U01/app/oracle/oradata/dgc/system01.dbf'
Character set ZHS16GBK
 
 
Memory script content:
{
Switch clone datafile all;
}
Executing memory script
 
Released channel: ORA_AUX_DISK_1
Data File 2 has been converted to a data file copy
Input data file copy recid = 1 stamp = 773487060 file name =/u01/app/oracle/oradata/dgc/undo
Tbs01.dbf
Data File 3 has been converted to a data file copy
Input data file copy recid = 2 stamp = 773487060 file name =/u01/app/oracle/oradata/dgc/sysa
Ux01.dbf
Data File 4 has been converted to a data file copy
Input data file copy recid = 3 stamp = 773487060 file name =/u01/app/oracle/oradata/dgc/user
S01.dbf
 
Memory script content:
{
Set until scn 526998;
Recover
Clone database
Delete archivelog
;
}
Executing memory script
 
Executing command: SET until clause
 
Start recover from month 1 to Month 12
Allocated channel: ORA_AUX_DISK_1
Channel ORA_AUX_DISK_1: sid = 155 devtype = DISK
 
Restoring media...
 
Archived log thread 1 sequence 14 is used as a file/u01/app/oracle/flash_recovery_area/DGP/archiv
Elog/2012_01_25/o1_mf_1_14_7kywg5q6 _. arc exists on the disk
Archived log file name =/u01/app/oracle/flash_recovery_area/DGP/archivelog/2012_01_25/o1
_ Mf_1_14_7kywg5q6 _. arc thread = 1 sequence = 14
Media Recovery completed. Time: 00:00:01
The recover is completed from month 1 to Month 12.
 
Memory script content:
{
Shutdown clone;
Startup clone nomount;
}
Executing memory script
 
Database uninstalled
Oracle instance disabled
 
Connected to the secondary database (not started)
Oracle instance started
 
The system's global region consists of 167772160 bytes.
 
Fixed Size 1218316 bytes
Variable Size 96471284 bytes
Database Buffers: 67108864 bytes
Redo Buffers: 2973696 bytes
SQL statement: CREATE CONTROLFILE REUSE SET DATABASE "DGC" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
# MAXLOGHISTORY 292
LOGFILE
GROUP 1 ('/u01/app/oracle/oradata/dgc/redo01.log') SIZE 50 m reuse,
GROUP 2 ('/u01/app/oracle/oradata/dgc/redo02.log') SIZE 50 m reuse,
GROUP 3 ('/u01/app/oracle/oradata/dgc/redo03.log') SIZE 50 M REUSE
DATAFILE
'/U01/app/oracle/oradata/dgc/system01.dbf'
Character set ZHS16GBK
 
 
Memory script content:
{
Set newname for tempfile 1
"/U01/app/oracle/oradata/dgc/temp01.dbf ";
Switch clone tempfile all;
Catalog clone datafilecopy "/u01/app/oracle/oradata/dgc/undotbs01.dbf ";
Catalog clone datafilecopy "/u01/app/oracle/oradata/dgc/sysaux01.dbf ";
Catalog clone datafilecopy "/u01/app/oracle/oradata/dgc/users01.dbf ";
Switch clone datafile all;
}
Executing memory script
 
Executing command: SET NEWNAME
 
Temporary File 1 has been renamed to/u01/app/oracle/oradata/dgc/temp01.dbf in the control file
 
The data file copy has been included in the directory
Data file copy filename =/u01/app/oracle/oradata/dgc/undotbs01.dbf recid = 1 stamp = 77
3487080
 
The data file copy has been included in the directory
Data file copy filename =/u01/app/oracle/oradata/dgc/sysaux01.dbf recid = 2 stamp = 773
487081
 
The data file copy has been included in the directory
Data file copy filename =/u01/app/oracle/oradata/dgc/users01.dbf recid = 3 stamp = 7734
87081
 
Data File 2 has been converted to a data file copy
Input data file copy recid = 1 stamp = 773487080 file name =/u01/app/oracle/oradata/dgc/undo
Tbs01.dbf
Data File 3 has been converted to a data file copy
Input data file copy recid = 2 stamp = 773487081 file name =/u01/app/oracle/oradata/dgc/sysa
Ux01.dbf
Data File 4 has been converted to a data file copy
Input data file copy recid = 3 stamp = 773487081 file name =/u01/app/oracle/oradata/dgc/user
S01.dbf
 
Memory script content:
{
Alter clone database open resetlogs;
}
Executing memory script
 
Database opened
The Duplicate Db is completed from month 1 to Month 12.
 
RMAN>
 
 
 
This article is from the "Shadow Knight" blog

Related Article

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.