首页 / 数据库 / MySQL / Oracle Duplicate搭建DataGuard
Duplicate搭建DataGuard:源库:run
{
allocate channel ch1 device type disk;
allocate channel ch2 device type disk;
backup as compressed backupset database;
sql "alter system archive log current";
release channel ch1;
release channel ch2;
}查询出数据文件路径
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@cai auxiliary sys/oracle@auxorcl;run
{
set newname for datafile 1 to "/u01/app/oracle/oradata/cai/system01.dbf";
set newname for datafile 2 to "/u01/app/oracle/oradata/cai/sysaux01.dbf";
set newname for datafile 3 to "/u01/app/oracle/oradata/cai/undotbs01.dbf";
set newname for datafile 4 to "/u01/app/oracle/oradata/cai/users01.dbf";
set newname for datafile 5 to "/u01/app/oracle/oradata/cai/test.dbf";
set newname for tempfile 1 to "/u01/app/oracle/oradata/cai/temp01.dbf";
duplicate target database for standby;
}Oracle 11gR2 在VMWare虚拟机中安装步骤 http://www.linuxidc.com/Linux/2013-09/89579p2.htmDebian 下 安装 Oracle 11g XE R2 http://www.linuxidc.com/Linux/2014-03/98881.htmOracle Data Guard 重要配置参数 http://www.linuxidc.com/Linux/2013-08/88784.htm基于同一主机配置 Oracle 11g Data Guard http://www.linuxidc.com/Linux/2013-08/88848.htm探索Oracle之11g DataGuard http://www.linuxidc.com/Linux/2013-08/88692.htmOracle Data Guard (RAC+DG) 归档删除策略及脚本 http://www.linuxidc.com/Linux/2013-07/87782.htmOracle Data Guard 的角色转换 http://www.linuxidc.com/Linux/2013-06/86190.htmOracle Data Guard的日志FAL gap问题 http://www.linuxidc.com/Linux/2013-04/82561.htmOracle 11g Data Guard Error 16143 Heartbeat failed to connect to standby 处理方法 http://www.linuxidc.com/Linux/2013-03/82009.htm更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12本文永久更新链接地址