Oracle duplicate搭建dataguard (Backup-based duplication)

发布时间:2020-05-31 23:40:22 作者:bin321
来源:网络 阅读:800

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;
}


推荐阅读:
  1. Rman配置DataGuard using Backup-based duplication with a target connection with filesystem
  2. Backup-based duplicate (RAC-RAC)

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

oracle 数据库 duplicate

上一篇:云计算学习体系-1.1-计算机基础学习使用VMware建虚拟机超详细图文教程

下一篇:bootstrap模态框二次封装

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》