打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
使用RMAN复制数据库
RMAN> DUPLICATE TARGET DATABASE TO orclaux nofilenamecheck;
Starting Duplicate Db at 27-3月 -12
using channel ORA_AUX_DISK_1
contents of Memory Script:
{
   set until scn  555341;
   set newname for datafile  1 to
"/dev/raw/raw1";
   set newname for datafile  2 to
"/dev/raw/raw3";
   set newname for datafile  3 to
"/dev/raw/raw2";
   set newname for datafile  4 to
"/dev/raw/raw4";
   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
Starting restore at 27-3月 -12
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 00001 to /dev/raw/raw1
restoring datafile 00002 to /dev/raw/raw3
restoring datafile 00003 to /dev/raw/raw2
restoring datafile 00004 to /dev/raw/raw4
channel ORA_AUX_DISK_1: reading from backup piece /oracle/backup/backdb<ORCL_23:778981561:1>.dbf
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/oracle/backup/backdb<ORCL_23:778981561:1>.dbf tag=TAG20120326T234601
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:35
Finished restore at 27-3月 -12
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ORCLAUX" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES     1024
  MAXINSTANCES     8
  MAXLOGHISTORY      292
LOGFILE
  GROUP  1 ( '/dev/raw/raw10', '/dev/raw/raw11' ) SIZE 50 M  REUSE,
  GROUP  2 ( '/dev/raw/raw12', '/dev/raw/raw13' ) SIZE 50 M  REUSE
DATAFILE
  '/dev/raw/raw1'
CHARACTER SET ZHS16GBK
contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script
released channel: ORA_AUX_DISK_1
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=778987671 filename=/dev/raw/raw3
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=778987671 filename=/dev/raw/raw2
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=778987671 filename=/dev/raw/raw4
contents of Memory Script:
{
   set until scn  555341;
   recover
   clone database
    delete archivelog
   ;
}
executing Memory Script
executing command: SET until clause
Starting recover at 27-3月 -12
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=1640 devtype=DISK
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=41
channel ORA_AUX_DISK_1: reading from backup piece /oracle/backup/archive<ORCL_25:778981619:1>.dbf
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=/oracle/backup/archive<ORCL_25:778981619:1>.dbf tag=TAG20120326T234659
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
archive log filename=/oracle/arch/1_41_777371211.dbf thread=1 sequence=41
channel clone_default: deleting archive log(s)
archive log filename=/oracle/arch/1_41_777371211.dbf recid=1 stamp=778987673
media recovery complete, elapsed time: 00:00:00
Finished recover at 27-3月 -12
contents of Memory Script:
{
   shutdown clone;
   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     486539264 bytes
Fixed Size                     1268196 bytes
Variable Size                138413596 bytes
Database Buffers             339738624 bytes
Redo Buffers                   7118848 bytes
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "ORCLAUX" RESETLOGS ARCHIVELOG
  MAXLOGFILES     16
  MAXLOGMEMBERS      3
  MAXDATAFILES     1024
  MAXINSTANCES     8
  MAXLOGHISTORY      292
LOGFILE
  GROUP  1 ( '/dev/raw/raw10', '/dev/raw/raw11' ) SIZE 50 M  REUSE,
  GROUP  2 ( '/dev/raw/raw12', '/dev/raw/raw13' ) SIZE 50 M  REUSE
DATAFILE
  '/dev/raw/raw1'
CHARACTER SET ZHS16GBK
contents of Memory Script:
{
   set newname for tempfile  1 to
"/dev/raw/raw5";
   switch clone tempfile all;
   catalog clone datafilecopy  "/dev/raw/raw3";
   catalog clone datafilecopy  "/dev/raw/raw2";
   catalog clone datafilecopy  "/dev/raw/raw4";
   switch clone datafile all;
}
executing Memory Script
executing command: SET NEWNAME
renamed temporary file 1 to /dev/raw/raw5 in control file
cataloged datafile copy
datafile copy filename=/dev/raw/raw3 recid=1 stamp=778987902
cataloged datafile copy
datafile copy filename=/dev/raw/raw2 recid=2 stamp=778987902
cataloged datafile copy
datafile copy filename=/dev/raw/raw4 recid=3 stamp=778987902
datafile 2 switched to datafile copy
input datafile copy recid=1 stamp=778987902 filename=/dev/raw/raw3
datafile 3 switched to datafile copy
input datafile copy recid=2 stamp=778987902 filename=/dev/raw/raw2
datafile 4 switched to datafile copy
input datafile copy recid=3 stamp=778987902 filename=/dev/raw/raw4
contents of Memory Script:
{
   Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 27-3月 -12
RMAN>
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
RMAN异机复制数据库
12c 表恢复
aidu : 使用RMAN在线创建DataGuard备用库(数据文件不同路径结构)
RMAN异机恢复测试 - victor1010的个人空间 - ITPUB个人空间 - po...
使用rman tspitr恢复被删除的数据或表
关于rman中set newname的探讨
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服