ogg停止业务重新初始化目标数据库流程

有时候如果数据差异太大,可能需要重新同步整个数据库,可以参考下列流程

源端:
run {
backup as compressed backupset database include current controlfile format '/ywdata/full_rman/fulllisbackup_%U';
}
查询一个scn号:
select current_scn from v$database;
select dbms_flashback.get_system_change_number from dual;
887839592
将备份集拷贝到目标端


目标端:
停止应用程序
shutdown immediate;
start nomount;
restore controlfile from '/ywarch/full_rman/fulllisbackup_senffv7v_1_1'
alter database mount;
catalog backuppiece  '/ywarch/full_rman/fulllisbackup_sdnffs25_1_1'
restore database;
拷贝归档日志
recover database until scn 887839592;
alter database open resetlogs;

创建临时表空间
create temporary tablespace test tempfile '/ywdata/lis/test01.dbf' size 200m;
alter database default temporary tablespace test;
drop tablespace temp including contents and datafiles;
create temporary tablespace temp tempfile '/ywdata/lis/temp01.dbf' size 2g reuse;
alter database default temporary tablespace temp;
drop tablespace test including contents and datafiles;
select file_name from dba_temp_files;


目标端goldengate:
dblogin userid goldengate password goldengate
delete replicat replis
edit params ./GLOBALS
添加参数,一般就是CHECKPOINTTABLE goldengate.ggchkpt
exit
dblogin userid goldengate password goldengate
add checkpointtable
add replicat replis,EXTTRAIL ./dirdat/rt CHECKPOINTTABLE goldengate.ggchkpt
edit params replis
参数根据需要做修改
alter replicat replis extseqno 89, extrba 0
start replis aftercsn 887839592

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26194851/viewspace-734858/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26194851/viewspace-734858/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值