网站建设资讯

NEWS

网站建设资讯

Oracleduplicate搭建dataguard(Backup-basedduplication)

duplicate搭建DG  (Backup-based duplication)
源库:

run
{
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
backup as compressed  backupset database;
sql 'alter system archive log current';
release channel ch2;
release channel ch3;
}


查询出数据文件路径
select 'set newname for datafile '||FILE_ID||' to '||file_name||';' from dba_data_files;


select 'set newname for datafile '||FILE_ID||' to '||file_name||';' from dba_TEMP_files;




使用duplicate,要在备库有跟主库一样的备份目录并且有备份集在里面,在主库运行命令。




在备库上配置好pfile和standby controlfile


备库操作:
auxorcl是目标库tnsname。

rman target sys/oracle@orcl auxiliary sys/oracle@auxorcl;

run
{
set newname for datafile 1 to '/u01/app/oracle/oradata/auxorcl/system01.dbf';
set newname for datafile 2 to '/u01/app/oracle/oradata/auxorcl/sysaux01.dbf';
set newname for datafile 3 to '/u01/app/oracle/oradata/auxorcl/undotbs01.dbf';
set newname for datafile 4 to '/u01/app/oracle/oradata/auxorcl/users01.dbf';
set newname for datafile 5 to '/u01/app/oracle/oradata/auxorcl/test.dbf';
set newname for tempfile 1 to '/u01/app/oracle/oradata/auxorcl/temp01.dbf';
duplicate target database for standby;
}

创新互联是一家从事企业网站建设、网站建设、成都网站建设、行业门户网站建设、网页设计制作的专业网站制作公司,拥有经验丰富的网站建设工程师和网页设计人员,具备各种规模与类型网站建设的实力,在网站建设领域树立了自己独特的设计风格。自公司成立以来曾独立设计制作的站点1000多家。


本文题目:Oracleduplicate搭建dataguard(Backup-basedduplication)
分享链接:http://cdweb.net/article/poogcj.html