前几天对
DUPLICATE到底做了什么一直倍感迷惑。。。
其实ORACLE推出DUPLICATE命令的目的不过是想把复杂的东西隐藏起来。
在RMAN中,所有命令都是基于DBID的,这样即使了DB_NAME相同,如果DBID不同RMAN也会认为是不同的数据库。
如restore controlfile from autobackup命令就是使用DBID来跟踪控制文件自动备份的。
可以通过RMAN恢复过程中记录的日志来观察RMAN在DUPLICATE过程中到底做了什么:
Recovery Manager: Release 9.2.0.7.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: ARSPRD (DBID=909397006)
connected to auxiliary database: ARSPRD (not mounted)
RMAN>
DUPLICATE TARGET DATABASE TO ARSPRD until time "to_date('11/02/2008 02:38','mm/dd/yyyy hh24:mi')" nofilenamecheck; 2>
3>
Starting Duplicate Db at 03-NOV-08
using target database controlfile instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=13 devtype=DISK
printing stored script: Memory Script
{
set until scn 8354369681872;
set newname for datafile 1 to
"/global/oracle/oradata2/ARSPRD/system01.dbf";
set newname for datafile 2 to
"/global/oracle/oradata3/ARSPRD/undotbs01.dbf";
set newname for datafile 3 to
"/global/oracle2/oradata1/ARSPRD/arsystem01.dbf";
set newname for datafile 4 to
"/global/oracle/oradata3/ARSPRD/drsys01.dbf";
set newname for datafile 5 to
"/global/oracle/oradata4/ARSPRD/tools01.dbf";
set newname for datafile 6 to
"/global/oracle/oradata4/ARSPRD/users01.dbf";
set newname for datafile 7 to
"/global/oracle/oradata3/ARSPRD/xdb01.dbf";
set newname for datafile 8 to
"/global/oracle2/oradata1/ARSPRD/arsystem02.dbf";
set newname for datafile 9 to
"/global/oracle/oradata1/ARSPRD/smc_mv_logs01.dbf";
set newname for datafile 10 to
"/global/oracle2/oradata3/ARSPRD/arsystem03.dbf";
restore
check readonly
clone database
;}
executing script: 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
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 03-NOV-08
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00003 to /global/oracle2/oradata1/ARSPRD/arsystem01.dbf
restoring datafile 00009 to /global/oracle/oradata1/ARSPRD/smc_mv_logs01.dbf
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h7juldl3_1_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restored backup piece 2
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h7juldl3_2_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restored backup piece 3
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h7juldl3_3_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restore complete
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /global/oracle/oradata3/ARSPRD/drsys01.dbf
restoring datafile 00005 to /global/oracle/oradata4/ARSPRD/tools01.dbf
restoring datafile 00006 to /global/oracle/oradata4/ARSPRD/users01.dbf
restoring datafile 00007 to /global/oracle/oradata3/ARSPRD/xdb01.dbf
restoring datafile 00008 to /global/oracle2/oradata1/ARSPRD/arsystem02.dbf
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h8jule8m_1_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restored backup piece 2
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h8jule8m_2_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restored backup piece 3
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h8jule8m_3_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restore complete
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /global/oracle/oradata2/ARSPRD/system01.dbf
restoring datafile 00002 to /global/oracle/oradata3/ARSPRD/undotbs01.dbf
restoring datafile 00010 to /global/oracle2/oradata3/ARSPRD/arsystem03.dbf
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h9juletp_1_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restored backup piece 2
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h9juletp_2_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restored backup piece 3
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_h9juletp_3_1.bak tag=TAG20081102T020003 params=NULL
channel ORA_AUX_DISK_1: restore complete
Finished restore at 03-NOV-08
sql statement:
CREATE CONTROLFILE REUSE SET DATABASE "ARSPRD" RESETLOGS ARCHIVELOG
MAXLOGFILES 5
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 ( '/global/oracle/oradata3/ARSPRD/redo01.log' ) SIZE 104857600 REUSE,
GROUP 2 ( '/global/oracle/oradata4/ARSPRD/redo02.log' ) SIZE 104857600 REUSE,
GROUP 3 ( '/global/oracle/oradata3/ARSPRD/redo03.log' ) SIZE 104857600 REUSE
DATAFILE
'/global/oracle/oradata2/ARSPRD/system01.dbf'
CHARACTER SET UTF8
printing stored script: Memory Script
{
switch clone datafile all;
}
executing script: Memory Script
datafile 2 switched to datafile copy
input datafilecopy recid=1 stamp=669851119 filename=/global/oracle/oradata3/ARSPRD/undotbs01.dbf
datafile 3 switched to datafile copy
input datafilecopy recid=2 stamp=669851119 filename=/global/oracle2/oradata1/ARSPRD/arsystem01.dbf
datafile 4 switched to datafile copy
input datafilecopy recid=3 stamp=669851119 filename=/global/oracle/oradata3/ARSPRD/drsys01.dbf
datafile 5 switched to datafile copy
input datafilecopy recid=4 stamp=669851119 filename=/global/oracle/oradata4/ARSPRD/tools01.dbf
datafile 6 switched to datafile copy
input datafilecopy recid=5 stamp=669851119 filename=/global/oracle/oradata4/ARSPRD/users01.dbf
datafile 7 switched to datafile copy
input datafilecopy recid=6 stamp=669851119 filename=/global/oracle/oradata3/ARSPRD/xdb01.dbf
datafile 8 switched to datafile copy
input datafilecopy recid=7 stamp=669851119 filename=/global/oracle2/oradata1/ARSPRD/arsystem02.dbf
datafile 9 switched to datafile copy
input datafilecopy recid=8 stamp=669851119 filename=/global/oracle/oradata1/ARSPRD/smc_mv_logs01.dbf
datafile 10 switched to datafile copy
input datafilecopy recid=9 stamp=669851119 filename=/global/oracle2/oradata3/ARSPRD/arsystem03.dbf
printing stored script: Memory Script
{
set until time "to_date('11/02/2008 02:38','mm/dd/yyyy hh24:mi')";
recover
clone database
delete archivelog
;}
executing script: Memory Script
executing command: SET until clause
Starting recover at 03-NOV-08
using channel ORA_AUX_DISK_1
starting media recovery
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=14583
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_hajulfjt_1_1.bak tag=TAG20081102T023331 params=NULL
channel ORA_AUX_DISK_1: restore complete
archive log filename=/global/oracle/oradump1/ARSPRD/archive/arch1_14583.dbf thread=1 sequence=14583
channel clone_default: deleting archive log(s)
archive log filename=/global/oracle/oradump1/ARSPRD/archive/arch1_14583.dbf recid=1 stamp=669851169
channel ORA_AUX_DISK_1: starting archive log restore to default destination
channel ORA_AUX_DISK_1: restoring archive log
archive log thread=1 sequence=14584
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/global/oracle3/ORADUMP/ARSPRD/backup/ARSPRD_rman_db_hfjuo421_1_1.bak tag=TAG20081103T023440 params=NULL
channel ORA_AUX_DISK_1: restore complete
archive log filename=/global/oracle/oradump1/ARSPRD/archive/arch1_14584.dbf thread=1 sequence=14584
channel clone_default: deleting archive log(s)
archive log filename=/global/oracle/oradump1/ARSPRD/archive/arch1_14584.dbf recid=2 stamp=669851202
media recovery complete
Finished recover at 03-NOV-08
printing stored script: Memory Script
{
shutdown clone;
startup clone nomount ;}
executing script: Memory Script
database dismounted
Oracle instance shut down
connected to auxiliary database (not started)
Oracle instance started
Total System Global Area 940660660 bytes
Fixed Size 456628 bytes
Variable Size 402653184 bytes
Database Buffers 536870912 bytes
Redo Buffers 679936 bytes
sql statement:
CREATE CONTROLFILE REUSE SET DATABASE "ARSPRD" RESETLOGS ARCHIVELOG
MAXLOGFILES 5
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 1
MAXLOGHISTORY 907
LOGFILE
GROUP 1 ( '/global/oracle/oradata3/ARSPRD/redo01.log' ) SIZE 104857600 REUSE,
GROUP 2 ( '/global/oracle/oradata4/ARSPRD/redo02.log' ) SIZE 104857600 REUSE,
GROUP 3 ( '/global/oracle/oradata3/ARSPRD/redo03.log' ) SIZE 104857600 REUSE
DATAFILE
'/global/oracle/oradata2/ARSPRD/system01.dbf'
CHARACTER SET UTF8
printing stored script: Memory Script
{
catalog clone datafilecopy "/global/oracle/oradata3/ARSPRD/undotbs01.dbf";
catalog clone datafilecopy "/global/oracle2/oradata1/ARSPRD/arsystem01.dbf";
catalog clone datafilecopy "/global/oracle/oradata3/ARSPRD/drsys01.dbf";
catalog clone datafilecopy "/global/oracle/oradata4/ARSPRD/tools01.dbf";
catalog clone datafilecopy "/global/oracle/oradata4/ARSPRD/users01.dbf";
catalog clone datafilecopy "/global/oracle/oradata3/ARSPRD/xdb01.dbf";
catalog clone datafilecopy "/global/oracle2/oradata1/ARSPRD/arsystem02.dbf";
catalog clone datafilecopy "/global/oracle/oradata1/ARSPRD/smc_mv_logs01.dbf";
catalog clone datafilecopy "/global/oracle2/oradata3/ARSPRD/arsystem03.dbf";
switch clone datafile all;}
executing script: Memory Script
cataloged datafile copy
datafile copy filename=/global/oracle/oradata3/ARSPRD/undotbs01.dbf recid=1 stamp=669851222
cataloged datafile copy
datafile copy filename=/global/oracle2/oradata1/ARSPRD/arsystem01.dbf recid=2 stamp=669851223
cataloged datafile copy
datafile copy filename=/global/oracle/oradata3/ARSPRD/drsys01.dbf recid=3 stamp=669851224
cataloged datafile copy
datafile copy filename=/global/oracle/oradata4/ARSPRD/tools01.dbf recid=4 stamp=669851225
cataloged datafile copy
datafile copy filename=/global/oracle/oradata4/ARSPRD/users01.dbf recid=5 stamp=669851226
cataloged datafile copy
datafile copy filename=/global/oracle/oradata3/ARSPRD/xdb01.dbf recid=6 stamp=669851227
cataloged datafile copy
datafile copy filename=/global/oracle2/oradata1/ARSPRD/arsystem02.dbf recid=7 stamp=669851228
cataloged datafile copy
datafile copy filename=/global/oracle/oradata1/ARSPRD/smc_mv_logs01.dbf recid=8 stamp=669851228
cataloged datafile copy
datafile copy filename=/global/oracle2/oradata3/ARSPRD/arsystem03.dbf recid=9 stamp=669851229
datafile 2 switched to datafile copy
input datafilecopy recid=1 stamp=669851222 filename=/global/oracle/oradata3/ARSPRD/undotbs01.dbf
datafile 3 switched to datafile copy
input datafilecopy recid=2 stamp=669851223 filename=/global/oracle2/oradata1/ARSPRD/arsystem01.dbf
datafile 4 switched to datafile copy
input datafilecopy recid=3 stamp=669851224 filename=/global/oracle/oradata3/ARSPRD/drsys01.dbf
datafile 5 switched to datafile copy
input datafilecopy recid=4 stamp=669851225 filename=/global/oracle/oradata4/ARSPRD/tools01.dbf
datafile 6 switched to datafile copy
input datafilecopy recid=5 stamp=669851226 filename=/global/oracle/oradata4/ARSPRD/users01.dbf
datafile 7 switched to datafile copy
input datafilecopy recid=6 stamp=669851227 filename=/global/oracle/oradata3/ARSPRD/xdb01.dbf
datafile 8 switched to datafile copy
input datafilecopy recid=7 stamp=669851228 filename=/global/oracle2/oradata1/ARSPRD/arsystem02.dbf
datafile 9 switched to datafile copy
input datafilecopy recid=8 stamp=669851228 filename=/global/oracle/oradata1/ARSPRD/smc_mv_logs01.dbf
datafile 10 switched to datafile copy
input datafilecopy recid=9 stamp=669851229 filename=/global/oracle2/oradata3/ARSPRD/arsystem03.dbf
printing stored script: Memory Script
{
Alter clone database open resetlogs;}
executing script: Memory Script
database opened
Finished Duplicate Db at 03-NOV-08
Recovery Manager complete.
分享到:
相关推荐
MySQL中如何处理重复数据(Duplicate)?
Fast Duplicate File Finder
FirmTools Duplicate Photo Finder 相似图像查询软件 你电脑中如果有很多图像,有很多可能是一个logo只差,你用其他md5检测软件是不能快速找出来的。这个软件可以搜索相似的图像,你查看后选择删除,非常的方便。 ...
duplicate绝对干货。利用duplicate复制数据库,文档中包换每一步的试验步骤,详细说明了每一步的作用及用途,和注意事项,一步一步至试验成功,绝对一次成功。
Oracle RMAN DUPLICATE教程
duplicate cleaner pro 破解版 4.0.5 。安装后,将第二步的x86及x64目录下的文件拷贝到安装目录下的x86与x64下。然后启动,输入长一点的序列号(随便输入字符),即可破解。
Rman通过duplicate创建standby
Duplicate File Finder单文件
Duplicate cleaner pro v3.2.7crack
Duplicate File Cleaner 2.5.4.168注册码
outlook duplicate items remover
Duplicate Email Remover
maya路径复制mel脚本 path_duplicate.mel
Altium Desiigner Duplicate Net Names Wire XXX的终极解决办法 Multiple Top Level Documents
Duplicate Cleaner 是由英国著名的 DigitalVolcano 软件公司精心设计与出品的一款专注于重复文件、目录查找与清理的系统工具,该软件能够根据字节、MD5以及其他多种哈希算法等内容比较方式,帮助你快速地查找出重复...
Duplicate Cleaner Pro 3.2.6 破解版
删除重复邮件,非常好用,使用前务必先关闭OUTLOOK,进去后就好了
用来查找重复文件的,压缩包有4个版本,挺好用的,这个也是我找了好多软件使用后,自己比较喜欢的 Easy Duplicate Finder 和 NoClone(重复文件查找)之一。我使用的版本是1.51 你的系统里肯定有重复的文件,拿图片做...
Oracle DataGuard搭建通过duplicate
Vistanita Duplicate Finder是一款重复文件查找工具,可以帮助你查找系统中完全相等的图片、音乐及其他文件等。找到重复的文件后,你可以选择删除它们,以释放存储空间、提高计算机性能。 Vistanita Duplicate ...