Oracle 11g Data Guard 使用duplicate from active database 创建 standby database(三)

2015-01-21 12:17:34 · 作者: · 浏览: 19
lone tempfile all;


? set newname for datafile? 1 to


?"/u01/app/oracle/oradata/dave/system01.dbf";


? set newname for datafile? 2 to


?"/u01/app/oracle/oradata/dave/sysaux01.dbf";


? set newname for datafile? 3 to


?"/u01/app/oracle/oradata/dave/undotbs01.dbf";


? set newname for datafile? 4 to


?"/u01/app/oracle/oradata/dave/users01.dbf";


? backup as copy reuse


? datafile? 1 auxiliary format


?"/u01/app/oracle/oradata/dave/system01.dbf"? datafile


?2 auxiliary format


?"/u01/app/oracle/oradata/dave/sysaux01.dbf"? datafile


?3 auxiliary format


?"/u01/app/oracle/oradata/dave/undotbs01.dbf"? datafile


?4 auxiliary format


?"/u01/app/oracle/oradata/dave/users01.dbf"? ;


? sql 'alter system archive log current';


--将datafile convert 到其他目录


}


executing Memory Script


?


executing command: SET NEWNAME


?


renamed tempfile 1 to /u01/app/oracle/oradata/dave/temp01.dbf in control file


?


executing command: SET NEWNAME


?


executing command: SET NEWNAME


?


executing command: SET NEWNAME


?


executing command: SET NEWNAME


?


Starting backup at 08-MAR-11


using channel ORA_DISK_1


channel ORA_DISK_1: starting datafile copy


--开始copy datafile,如果数据文件比较大,这个会比较慢


input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf


output file name=/u01/app/oracle/oradata/dave/system01.dbf tag=TAG20110308T161204


channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:55


channel ORA_DISK_1: starting datafile copy


input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf


output file name=/u01/app/oracle/oradata/dave/sysaux01.dbf tag=TAG20110308T161204


channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:35


channel ORA_DISK_1: starting datafile copy


input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf


output file name=/u01/app/oracle/oradata/dave/undotbs01.dbf tag=TAG20110308T161204


channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:15


channel ORA_DISK_1: starting datafile copy


input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf


output file name=/u01/app/oracle/oradata/dave/users01.dbf tag=TAG20110308T161204


channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01


Finished backup at 08-MAR-11


?


sql statement: alter system archive log current


?


contents of Memory Script:


{


? switch clone datafile all;


}


executing Memory Script


?


datafile 1 switched to datafile copy


input datafile copy RECID=4 STAMP=745258432 file name=/u01/app/oracle/oradata/dave/system01.dbf


datafile 2 switched to datafile copy


input datafile copy RECID=5 STAMP=745258432 file name=/u01/app/oracle/oradata/dave/sysaux01.dbf


datafile 3 switched to datafile copy


input datafile copy RECID=6 STAMP=745258432 file name=/u01/app/oracle/oradata/dave/undotbs01.dbf


datafile 4 switched to datafile copy


input datafile copy RECID=7 STAMP=745258432 file name=/u01/app/oracle/oradata/dave/users01.dbf


Finished Duplicate Db at 08-MAR-11


?


RMAN>


?


DG 复制到这一步已经操作完成了。 但是还有一些细节需要处理。


?


?


?


两点注意事项:


?



(1)如果使用的是非catalog,在rman 连接时,加上nocatalog关键字,如:


?


DG2:/home/oracle> rman targetsys/oracle@DG_PD? auxiliarysys/oracle@DG_ST nocatalog


?


Recovery Manager: Release 11.2.0.3.0 -Production on Fri Oct 28 18:46:46 2011


?


Copyright (c) 1982, 2011, Oracle and/or itsaffiliates.? All rights reserved.


?


connected to target database: DG(DBID=1679060044)


using target databasecontrol fi