异构GoldenGate 12c 单向复制配置(支持DDL复制)
1.开始配置OGG支持DDL复制(在source端操作)
1.1 赋予权限
SQL> conn /as sysdba
已连接。
SQL> grant execute on utl_file to ggs; 1.2 修改全局配置文件添加ggschema
GGSCI (WIN-GM5PVS1CILH) 18> edit param ./GLOBALS
GGSCI (WIN-GM5PVS1CILH) 19> view param ./GLOBALS
ggschema ggs
GGSCI (WIN-GM5PVS1CILH) 20> 1.3 运行相关sql脚本 及修改参数 C:\Users\Administrator>cd C:\ora11g\product\ogg_src
C:\ora11g\product\ogg_src>sqlplus /nolog
SQL> conn /as sysdba
已连接。 #第一个sql脚本
SQL> @marker_setup.sql You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation. Enter Oracle GoldenGate schema name:ggs Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GGS MARKER TABLE
-------------------------------
OK MARKER SEQUENCE
-------------------------------
OK Script complete.
SQL> #禁用 recyclebin 。官网的解释如下:If the recyclebin is enabled, the Oracle GoldenGate DDL trigger session receives implicitrecycle bin DDL operations that cause the trigger to fail. SQL> show parameter recyclebin; NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
recyclebin string on SQL> alter system set recyclebin=off scope=spfile; 系统已更改。 SQL> show parameter recyclebin; #需重启实例后改参数才生效 NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
recyclebin string off
SQL> #第二个sql脚本 注意:此脚本要求ggs必须是独立表空间且是自动扩展的
SQL> @ddl_setup.sql Oracle GoldenGate DDL Replication setup script Verifying that current user has privileges to install DDL Replication... You will be prompted for the name of a schema for the Oracle GoldenGate databaseobjects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Ora
cle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation. Enter Oracle GoldenGate schema name:ggs Working, please wait ...
Spooling to file ddl_setup_spool.txt Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ... Check complete. WARNING: Tablespace TBS_GGS does not have AUTOEXTEND enabled. Using GGS as a Oracle GoldenGate schema name. Working, please wait ... DDL replication setup script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GGS CLEAR_TRACE STATUS: Line/pos Error
-------------------- -----------------------------------------------------------
------
No errors No errors
.........
SUCCESSFUL installation of DDL Replication software components Script complete.
SQL> #第三个sql
SQL> @role_setup.sql GGS Role setup script This script will drop and recreate the role GGS_GGSUSER_ROLE
To use a different role name, quit this script and then edit the params.sql scri
pt to change the gg_role parameter to the preferred name. (Do not run the script.) You will be prompted for the name of a schema for the GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation. Enter GoldenGate schema name:ggs
已写入 file role_setup_set.txt PL/SQL 过程已成功完成。 Role setup script complete Grant this role to each user assigned to the Extract, GGSCI, and Manager processes, by using the following SQL command: GRANT GGS_GGSUSER_ROLE TO <loggedUser> where <loggedUser> is the user assigned to the GoldenGate processes.
SQL> grant ggs_ggsuser_role to ggs; 授权成功。
SQL> #其他sql脚本
SQL> @ddl_enable.sql
SQL> @?/rdbms/admin/dbmspool.sql
SQL> @ddl_pin.sql ggs
SQL> 2.source端修改extract进程的params文件,添加"ddl include all"参数,重启extract进程
2.1 查看添加后的参数
GGSCI (WIN-GM5PVS1CILH) 40> view param eora_t1
extract eora_t1
setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
ddl include all
userid ggs@orcl_w,password ggs
exttrail dirdat/sp
table scott.*; 2.2 重启 EXTRACT 进程
GGSCI (WIN-GM5PVS1CILH) 41> stop extract eora_t1 Sending STOP request to EXTRACT EORA_T1 ...
Request processed. GGSCI (WIN-GM5PVS1CILH) 42> start extract eora_t1 Sending START request to MANAGER ('GGSMGR') ...
EXTRACT EORA_T1 starting 2.3 查看进程状态
GGSCI (WIN-GM5PVS1CILH) 43> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING
EXTRACT RUNNING EORA_T1 00:00:00 00:00:01
EXTRACT RUNNING PORA_T1 00:00:00 00:00:06 GGSCI (WIN-GM5PVS1CILH) 44> info extract eora_t1 EXTRACT EORA_T1 Last Started 2016-12-14 11:07 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:06 ago)
Process ID 2804
Log Read Checkpoint Oracle Redo Logs
2016-12-14 11:07:41 Seqno 7, RBA 18905600
SCN 0.1013586 (1013586) GGSCI (WIN-GM5PVS1CILH) 45> 3. target端修改replicat进程的params文件,添加"ddl include all"和"ddlerror default ignore retryop maxretries 3 retrydelay 5" 参数,重启replicat进程 3.1 查看添加后的参数
GGSCI (Oracle02 as ggt@orcl) 11> edit param rora_t1
GGSCI (Oracle02 as ggt@orcl) 12> view param rora_t1 replicat rora_t1
setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
ddl include all
ddlerror default ignore retryop maxretries 3 retrydelay 5
userid ggt,password ggt
handlecollisions
assumetargetdefs
discardfile dirrpt/rora_t1.dsc,purge
map scott.* ,target scott.*; 3.2 重启 REPLICAT 进程
GGSCI (Oracle02 as ggt@orcl) 13> stop replicat rora_t1
REPLICAT RORA_T1 is already stopped. GGSCI (Oracle02 as ggt@orcl) 14> start replicat rora_t1 Sending START request to MANAGER ...
REPLICAT RORA_T1 starting 3.3 查看进程状态
GGSCI (Oracle02 as ggt@orcl) 15> info all
Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING
REPLICAT RUNNING RORA_T1 00:00:00 00:00:02 GGSCI (Oracle02 as ggt@orcl) 16> info replicat rora_t1
REPLICAT RORA_T1 Last Started 2016-12-14 11:13 Status RUNNING
Checkpoint Lag 00:16:48 (updated 00:00:00 ago)
Process ID 27403
Log Read Checkpoint File dirdat/rp000000006
2016-12-14 10:57:03.302367 RBA 4347
GGSCI (Oracle02 as ggt@orcl) 17> 4.测试
SQL> conn scott/scott
已连接。
SQL> select table_name from user_tables; TABLE_NAME
------------------------------
T1
SALGRADE
BONUS
EMP
DEPT SQL> create table t2 as select object_id,object_name from dba_objects;
表已创建。
SQL> #在目标主机验证
SQL> conn scott/scott@orcl_L
已连接。
SQL> select table_name from user_tables; TABLE_NAME
------------------------------
T2
T1
SALGRADE
BONUS
EMP
DEPT 已选择6行。 SQL>
异构GoldenGate 12c 单向复制配置(支持DDL复制)的更多相关文章
- 异构GoldenGate 12c 单向复制配置
1.分别在windows2008.linux平台部署oracle 11.2.0.4 2.分别在windows2008.linux平台部署gg. 2.1 windows平台: gg的安装目录位 C:\o ...
- 【OGG】OGG的单向复制配置-支持DDL(二)
[OGG]OGG的单向复制配置-支持DDL(二) 一.1 BLOG文档结构图 一.2 前言部分 一.2.1 导读 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的 ...
- 异构GoldenGate 12c 双向复制配置
1.配置window,添加checkpoint表(本文windows和linux互为source和target) GGSCI (WIN-GM5PVS1CILH) 1> view param ./ ...
- GoldenGate配置(三)之DDL复制配置
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/huangyanlong/article/details/33430293 GoldenGate配置( ...
- GoldenGate单向复制配置示例
一:环境介绍 --source端 ip地址:192.168.123.10 数据库版本:11.2.0.1.0 32 bit 操作系统版本:centos 4.5 32 bit ogg版本:fbo_ggs_ ...
- GoldenGate配置(一)之单向复制配置
GoldenGate配置(一)之单向复制配置 环境: Item Source System Target System Platform Red Hat Enterprise Linux Server ...
- goldengate 12c 12.2 新特性(updated)
GoldenGate 12.2已经提供下载,增加了不少新特性 1. 异构配置加强不在需要sourceDefs和AssumeTargetDefs文件,在队列文件中已经包含metadata信息,比如tab ...
- Oracle GoldenGate 12c实时捕获SQL Server数据
在Oracle GoldenGate 12c中,对一些最新的数据库提供了支持,比如SQL Server 2012/2014,当然12c也支持sql server 2008.主要新增特性有: 捕获进程可 ...
- 搭建GoldenGate的单向复制环境
配置环境: 建议在相同版本OGG(即Oracle GoldenGate)之间进行复制,我在这里之所以选择不同版本的OGG,便于后续的比较学习. 一.准备OGG的运行用户 在这里,我直接使用oracle ...
随机推荐
- LVS 实现负载均衡原理及安装配置详解
负载均衡集群是 load balance 集群的简写,翻译成中文就是负载均衡集群.常用的负载均衡开源软件有nginx.lvs.haproxy,商业的硬件负载均衡设备F5.Netscale.这里主要是学 ...
- 【转】在64位windows下使用instsrv.exe和srvany.exe创建windows服务
本文转自:https://www.iflym.com/index.php/computer-use/201205020001.html 在32位的windows下,包括windows7,windows ...
- php中对象(object)与数组(array)之间的相互转换
/** * 数组 转 对象 * * @param array $arr 数组 * @return object */ function array_to_object($arr) { if (gett ...
- 树莓派命令行配置连接wifi
iwlist scan sudovim /etc/wpa_supplicant/wpa_supplicant.conf network={ ssid="WIFINAME" ...
- .NET 获取Get方式URL中的参数键值
在Web开发中,我们常常会涉及到需要获取Get方式URL中的参数键值的情况,这里简单介绍三种方法: 第一种:常用的做法有使用JavaScript获取location.href后用正则表达式匹配获取此U ...
- BarTender出现3702错误怎么办
很多时候,在我们不经意间,BarTender条码打印软件就会弹出各种错误消息,其实都是一些常见的小问题,是我们操作不当引起的,本文,小编就给大家来讲解BarTender错误消息3702的解决办法. 错 ...
- WebGL 颜色与纹理
1.纹理坐标 纹理坐标是纹理图像上的坐标,通过纹理坐标可以在纹理图像上获取纹理颜色.WebGL系统中的纹理坐标系统是二维的,如图所示.为了将纹理坐标和广泛使用的x.y坐标区分开来,WebGL使用s和t ...
- 【matlab】=size(img)的其中两种用法&zeros( )
i1=imread('D:\Work\1.png'); i1=rgb2gray(i1); [m,n]=size(i1); 返回图片的尺寸信息, 并存储在m.n中.其中m中存储的是行数,n中存储的是列数 ...
- Python--异常处理--12
Python 异常处理 原创博文,转载请标明出处--周学伟http://www.cnblogs.com/zxouxuewei/ python提供了两个非常重要的功能来处理python程序在运行中出现的 ...
- 定时器Enable Disable控制
问题:定时器如何控制它一会可用一会不可用,根据某个业务需求,比如:一个控制台程序扫描表中某个条件的数据,处理数据,控制台分布式部署,当主机宕机后,从机扫描定时器需要可用,当主机复活后,从机的扫描定时器 ...