博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在相同的主机上创建一个duplicate数据库
阅读量:6501 次
发布时间:2019-06-24

本文共 12815 字,大约阅读时间需要 42 分钟。

RMAN> duplicate target database to dupdb;Starting Duplicate Db at 25-JUN-2015 08:18:24using target database control file instead of recovery catalogallocated channel: ORA_AUX_DISK_1channel ORA_AUX_DISK_1: SID=396 device type=DISKcontents of Memory Script:{   sql clone "create spfile from 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 bytesDatabase 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'' scope=spfilesql statement: alter system set  db_unique_name =  ''DUPDB'' comment= ''Modified by RMAN duplicate'' scope=spfileOracle 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: SID=396 device type=DISKchannel ORA_AUX_DISK_1: starting datafile backup set restorechannel ORA_AUX_DISK_1: restoring control 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/oradata/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  10 to  "/u01/app/oracle/oradata/dupdb/nnc_index02.dbf";   set newname for datafile  11 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: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting command: SET NEWNAMEexecuting 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 restore 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 of 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 name=/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/dupdb/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=/u01/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 11 switched to datafile copyinput datafile copy RECID=23 STAMP=883297151 file name=/u01/app/oracle/oradata/dupdb/nnc_index03.dbfcontents of Memory Script:{   set until 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_DISK_1starting media recoveryarchived log for thread 1 with sequence 10 is already on disk as file /home/oracle/arch/1_10_883118265.dbfarchived log for thread 1 with sequence 11 is already on disk as file /home/oracle/arch/1_11_883118265.dbfarchived 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'' comment= ''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                     2252824 bytesVariable Size                264245224 bytesDatabase Buffers              50331648 bytesRedo Buffers                   4718592 bytessql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUPDB" RESETLOGS ARCHIVELOG   MAXLOGFILES     16  MAXLOGMEMBERS      3  MAXDATAFILES      100  MAXINSTANCES     8  MAXLOGHISTORY      292 LOGFILE  GROUP   1 ( '/u01/app/oracle/oradata/dupdb/redo01.log' ) SIZE 50 M  REUSE,  GROUP   2 ( '/u01/app/oracle/oradata/dupdb/redo02.log' ) SIZE 50 M  REUSE,  GROUP   3 ( '/u01/app/oracle/oradata/dupdb/redo03.log' ) SIZE 50 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 filecataloged 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 name=/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 11 switched to datafile copyinput datafile copy RECID=10 STAMP=883297164 file name=/u01/app/oracle/oradata/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>

转载于:https://www.cnblogs.com/wangchaoyuana/p/7531989.html

你可能感兴趣的文章
从Date类型转为中文字符串
查看>>
基于multisim的fm调制解调_苹果开始自研蜂窝网调制解调器 最快2024年能用上?
查看>>
mupdf不支持x64_Window权限维持(七):安全支持提供者
查看>>
cf修改游戏客户端是什么意思_瓦罗兰特很有可能取代cf成为国内最火的fps游戏...
查看>>
proto文件支持继承吗_JavaScript继承(一)——原型链
查看>>
labview如何弹出提示窗口_LabVIEW开发者必读的问答汇总,搞定疑难杂症全靠它了!...
查看>>
提取series中的数值_Python中None和numpy.nan的区别
查看>>
hikariconfig mysql_HikariConfig配置解析
查看>>
mysql批量数据多次查询数据库_mysql数据库批量操作
查看>>
jquery 乱码 传参_jquery获取URL中参数解决中文乱码问题的两种方法
查看>>
JDBC_MySQL_jdbc连接mysql_MySQL
查看>>
mysql cte的好处_Mysql 8 重要新特性 - CTE 通用表表达式
查看>>
zcu106 固化_xilinx zcu106 vcu demo
查看>>
java ftpclient 代码_java后台代码ftpclient下载文件
查看>>
java数据库生成model_继承BaseModelGenerator 生成Model时添加数据库表字段 生成代码示例...
查看>>
java面向对象的概念_java面向对象(上)-- 面向对象的概念
查看>>
java内部类访问外部类变量 final_Java内部类引用外部类中的局部变量为什么必须是final问题解析...
查看>>
java 栈帧与类的关系_深入理解Java虚拟机之类运行时栈帧结构
查看>>
php中删除评论怎么做的,详解PHP如何实现评论回复删除功能
查看>>
macports 安装php,「macports」MacOS 中 MacPorts 安装和使用 - 金橙教程网
查看>>