dup 方式搭建adg 报错汇总

1.文章简介

在项目上,Adg没少搭建,同时也没少碰到报错,因平常实施文档比较零落,很有必要汇总记录异常问题,方便查阅。

2.使用dup 搭建 adg   dup 复制过程拆解

dup 前需要提前配置好dg同步参数,在此略,此处只记录dup过程。

Recovery Manager: Release 11.2.0.4.0 - Production on Thu Oct 19 23:33:53 2023

Starting Duplicate Db at 2023:10:1923:34:11

contents of Memory Script:
{
   backup as copy reuse
   passwordfile auxiliary format  '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/orapwxxdb1 '   ;
}
executing Memory Script

Starting backup at 2023:10:1923:34:11
Finished backup at 2023:10:1923:34:12

step1) :会重新复制一份密码文件进行reuse (对先前手动copy 的密码文件进行覆盖,只会覆盖dup节点,另外节点不会被覆盖)

            手动核对:-rw-r----- 1 oracle oinstall 1536 Oct 19 23:34 orapwxxdb1  

                              -rw-r----- 1 oracle oinstall 1536 Oct 18 10:04  orapwxxdb2

contents of Memory Script:
{xx
   backup as copy current controlfile for standby auxiliary format  '+DATAx'x/x'xdb/control01.ctl';
   restore clone primary controlfile to  '+ARCHXX/xxdb/control02.ctl' from 
 '+DATAxx/xxdb/control01.ctl';xx
}
executing Memory Script

Starting backup at 2023:10:1923:34:13
channel pric1: starting datafile copy
copying standby control file
output file name=+DATAXX/xxdb/control01.ctl tag=TAG20231019T233413
channel pric1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 2023:10:1923:34:15

Starting restore at 2023:10:1923:34:16

channel stdc1: skipped, AUTOBACKUP already found
channel stdc2: skipped, AUTOBACKUP already found
channel stdc4: skipped, AUTOBACKUP already found
channel stdc5: skipped, AUTOBACKUP already found
channel stdc6: skipped, AUTOBACKUP already found
channel stdc7: skipped, AUTOBACKUP already found
channel stdc8: skipped, AUTOBACKUP already found
channel stdc3: copied control file copy
Finished restore at 2023:10:1923:34:23

step2) :restore 备库控制文件

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

step3) :将备库开启到mount 状态

contents of Memory Script:
{   set newname for clone tempfile  1 to new;
   set newname for clone tempfile  2 to new;
   set newname for clone tempfile  3 to new;
   set newname for clone tempfile  4 to new;
   set newname for clone tempfile  5 to new;
   set newname for clone tempfile  6 to new;
   set newname for clone tempfile  7 to new;
   set newname for clone tempfile  8 to new;
   switch clone tempfile all;

step4) :将临时文件set newname 改名,并将控制文件中的临时文件信息改为新文件信息

                 对应操作命令结果-->取部分结果为例:
                     (
                     executing command: SET NEWNAME
                     renamed tempfile 1 to +DATAxx in control file
                     renamed tempfile 2 to +DATAxx in control file
                     renamed tempfile 3 to +DATAxx in control file
                     renamed tempfile 4 to +DATAxx in control file
                     renamed tempfile 5 to +DATAxx in control file
                     renamed tempfile 6 to +DATAxx in control file
                     renamed tempfile 7 to +DATAxx in control file
                     renamed tempfile 8 to +DATAxx in control file 
                     )

   set newname for clone datafile  259 to new;
   set newname for clone datafile  260 to new;

   backup as copy reuse

   datafile  259 auxiliary format new
   datafile  260 auxiliary format new;
step5) :将数据文件set newname 改名并对数据文件进行克隆复制
                     对应操作命令结果-->取部分结果为例:
                     (  
                     executing command: SET NEWNAME           
                     executing command: SET NEWNAME            
                     executing command: SET NEWNAME             

                     Starting backup at 2023:10:1923:34:30
                     channel pric1: starting datafile copy
                      input datafile file number=00005                                                               name=+DATAxx/xxprod/datafile/undotbs2.478.1137081919
                      channel pric2: starting datafile copy
                     input datafile file number=00007             name=+DATAxx/xxprod/datafile/xx_tbs.271.1137062135
                      channel pric3: starting datafile copy

                      channel pric3: datafile copy complete, elapsed time: 00:00:26
                     output file name=+DATAxx/xxdb/datafile/upss_data.506.1150683923 tag=TAG20231019T233431
                     channel pric5: datafile copy complete, elapsed time: 00:00:11
                     Finished backup at 2023:10:2002:25:34

                        )

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=544 STAMP=1150683939 file name=+DATAxx/xxdb/datafile/system.404.1150681519
datafile 2 switched to datafile copy
input datafile copy RECID=545 STAMP=1150683940 file name=+DATAxx/xxdb/datafile/sysaux.467.1150683555
datafile 3 switched to datafile copy

step6) : switch 数据文件信息 到新文件信息(即更新控制文件中数据文件的信息,指向新文件)

Finished Duplicate Db at 2023:10:2002:27:22

dup 就是经过了以上6个步骤完成 adg 备库的数据克隆复制。

未完待续,后续会继续更新 dup完成后的一些异常处理。。。。。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值