概述
一、OGG双向DDL复制
1、基本信息
1.1 经典抽取模式+ trigger based ddl 方式配置
node1: hostname ogg1 IP 192.168.91.137
node2: hostname ogg2 IP 192.168.91.138
1.2 版本信息
[oracle@ogg1 ~]$ cd $GG_HOME
[oracle@ogg1 goldengate]$ ggsci -v
Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.1 OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Dec 12 2015 00:54:38
Copyright (C) 1995, 2015, Oracle and/or its affiliates. All rights reserved.
[oracle@ogg1 goldengate]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.4.0 Production on Fri Mar 31 10:49:37 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected.
SQL> select banner from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
PL/SQL Release 11.2.0.4.0 - Production
CORE 11.2.0.4.0 Production
TNS for Linux: Version 11.2.0.4.0 - Production
NLSRTL Version 11.2.0.4.0 - Production
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ogg1 goldengate]$ cat /etc/redhat-release
CentOS release 6.5 (Final)
1.3 拓扑图
eddl1--------------------->aa----------------->pddl1----------------->bb------------>rddl1
node1 node2
rddl2<------------------dd<----------------------pddl2<---------------cc<------------eddl2
2、安装GG,在两个节点安装OGG软件
$ su - root
$ mkdir -p /u01/app/goldengate
$ chown -R oracle:oinstall /u01/app/goldengate
$ su - oracle
$ cd
$ ll unzip fbo_ggs_Linux_x64_shiphome.zip
$ cd /home/oracle/fbo_ggs_Linux_x64_shiphome/Disk1
$ sed -i "s/INSTALL_OPTION=/INSTALL_OPTION=ORA11g/" /home/oracle/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
$ sed -i "s|SOFTWARE_LOCATION=|SOFTWARE_LOCATION=/u01/app/goldengate|" /home/oracle/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
$ sed -i "s/START_MANAGER=/START_MANAGER=false/" /home/oracle/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
$ ./runInstaller -silent -responseFile /home/oracle/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
3、配置环境变量
配置oracle用户的环境变量(ogg2节点改ORACLE_SID=ggtt即可)
$ vi ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=ggss
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin:$ORACLE_HOME/jdk/bin
export PATH=$ORACLE_HOME/bin:/usr/sbin:$GG_HOME:$PATH
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:/usr/local/lib
export GG_HOME=/u01/app/goldengate
umask 022
$ source ~/.bash_profile
4、配置监听
4.1 两节点服务器上配置tnsnames.oras
$ vi $TNS_ADMIN/tnsnames.ora
GGSS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.91.137)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ggss)
)
)
GGTT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.91.138)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ggtt)
)
)
4.2 互相ping通
OGG1端:
[oracle@ogg1]$ sqlplus sys/oracle4U@ggtt as sysdba
OGG2端:
[oracle@ogg2]$ sqlplus sys/oracle4U@ggss as sysdba
5、配置数据库参数
5.1 创建ogg用户(两节点操作基本相同,具体根据实际情况修改)
[oracle@ogg1]$ mkdir -p /u01/app/archivelog
[oracle@ogg1]$ sqlplus / as sysdba
[oracle@ogg1 Disk1]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 6 01:01:34 2017
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> alter system set log_archive_dest_1='LOCATION=/u01/app/archivelog' scope=spfile;
System altered.
SQL> alter system set log_archive_format='ggss_%t_%s_%r.arc' scope=spfile;
System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 843456512 bytes
Fixed Size 2257920 bytes
Variable Size 545262592 bytes
Database Buffers 293601280 bytes
Redo Buffers 2334720 bytes
Database mounted.
SQL> alter database archivelog;
Database altered.
SQL> alter database open;
Database altered.
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /u01/app/archivelog
Oldest online log sequence 3
Next log sequence to archive 5
Current log sequence 5
SQL> alter database add supplemental log data;
Database altered.
SQL> select supplemental_log_data_min from v$database;
SUPPLEME
--------
YES
SQL> alter database force logging;
Database altered.
SQL> create tablespace tbs_ogg datafile '/u01/app/oracle/oradata/ggss/tbs_ogg.dat' size 200M autoextend on next 5M;
Tablespace created.
SQL> create user ogg identified by ogg default tablespace tbs_ogg temporary tablespace temp account unlock;
User created.
SQL> alter system set enable_goldengate_replication = true scope=both;
System altered.
SQL> alter user ogg quota unlimited on tbs_ogg;
User altered.
SQL> grant connect,resource to ogg;
Grant succeeded.
SQL> grant execute on utl_file to ogg;
Grant succeeded.
6、启用ddl,两端均配置
运行OGG支持DDL脚本
[oracle@ogg1 ]$ cd $GG_HOME
[oracle@ogg1 goldengate]$ sqlplus / as sysdba
SQL> @marker_setup.sql
Marker setup script
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:ogg
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to OGG
MARKER TABLE
-------------------------------
OK
MARKER SEQUENCE
-------------------------------
OK
Script complete.
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 database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 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:ogg
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.
Using OGG 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 OGG
CLEAR_TRACE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
CREATE_TRACE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
TRACE_PUT_LINE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
INITIAL_SETUP STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
DDLVERSIONSPECIFIC PACKAGE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
DDLREPLICATION PACKAGE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
DDLREPLICATION PACKAGE BODY STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
DDL IGNORE TABLE
-----------------------------------
OK
DDL IGNORE LOG TABLE
-----------------------------------
OK
DDLAUX PACKAGE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
DDLAUX PACKAGE BODY STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
SYS.DDLCTXINFO PACKAGE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
SYS.DDLCTXINFO PACKAGE BODY STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
DDL HISTORY TABLE
-----------------------------------
OK
DDL HISTORY TABLE(1)
-----------------------------------
OK
DDL DUMP TABLES
-----------------------------------
OK
DDL DUMP COLUMNS
-----------------------------------
OK
DDL DUMP LOG GROUPS
-----------------------------------
OK
DDL DUMP PARTITIONS
-----------------------------------
OK
DDL DUMP PRIMARY KEYS
-----------------------------------
OK
DDL SEQUENCE
-----------------------------------
OK
GGS_TEMP_COLS
-----------------------------------
OK
GGS_TEMP_UK
-----------------------------------
OK
DDL TRIGGER CODE STATUS:
Line/pos Error
---------------------------------------- -----------------------------------------------------------------
No errors No errors
DDL TRIGGER INSTALL STATUS
-----------------------------------
OK
DDL TRIGGER RUNNING STATUS
------------------------------------------------------------------------------------------------------------------------
ENABLED
STAYMETADATA IN TRIGGER
------------------------------------------------------------------------------------------------------------------------
OFF
DDL TRIGGER SQL TRACING
------------------------------------------------------------------------------------------------------------------------
0
DDL TRIGGER TRACE LEVEL
------------------------------------------------------------------------------------------------------------------------
NONE
LOCATION OF DDL TRACE FILE
------------------------------------------------------------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/ggss/ggss/trace/ggs_ddl_trace.log
Analyzing installation status...
VERSION OF DDL REPLICATION
------------------------------------------------------------------------------------------------------------------------
OGGCORE_12.2.0.1.0_PLATFORMS_151211.1401
STATUS OF DDL REPLICATION
------------------------------------------------------------------------------------------------------------------------
SUCCESSFUL installation of DDL Replication software components
Script complete.
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 script 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:ogg
Wrote file role_setup_set.txt
PL/SQL procedure successfully completed.
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 ogg;
grant succeeded.
SQL> @ddl_enable.sql
Trigger altered.
7、准备初始化测试数据
7.1 OGG1端:
[oracle@ogg1 goldengate]$ sqlplus / as sysdba
SQL> create tablespace TESTTBS001 datafile '/u01/app/oracle/oradata/ggss/testtbs001.dat' size 100M autoextend on next 5M;
Tablespace created.
SQL> create user testogg identified by test2017 default tablespace TESTTBS001 temporary tablespace temp;
User created.
SQL> create directory dump_dir as '/home/oracle/dump';
Directory created.
SQL> grant connect,resource,select_catalog_role to testogg;
Grant succeeded.
SQL> grant select any dictionary to testogg;
Grant succeeded.
SQL> grant read,write on directory dump_dir to testogg;
Grant succeeded.
SQL> conn testogg/test2017
Connected.
SQL> create table t1 as select * from dba_objects;
Table created.
SQL> select count(*) from t1 ;
COUNT(*)
----------
86322
[oracle@ogg1 goldengate]$ mkdir -p /home/oracle/dump
[oracle@ogg1 goldengate]$ expdp system/oracle4U@ggss schemas=testogg dumpfile=expdp_testogg.dmp directory=dump_dir logfile=exppd_testogg.log
[oracle@ogg1 goldengate]$ scp -r /home/oracle/dump/expdp_testogg.dmp oracle@192.168.91.138:/home/oracle/dump/expdp_testogg.dmp
oracle@192.168.91.138's password:
expdp_testogg.dmp 100% 8756KB 8.6MB/s 00:00
注:保证对端有此目录
7.2 OGG2端:
[oracle@ogg2 goldengate]$ mkdir -p /home/oracle/dump
[oracle@ogg2 goldengate]$ sqlplus / as sysdba
SQL> create tablespace TESTTBS001 datafile '/u01/app/oracle/oradata/ggtt/testtbs001.dat' size 100M autoextend on next 5M;
SQL> create directory dump_dir as '/home/oracle/dump';
SQL> exit
[oracle@ogg2 goldengate]$ impdp system/oracle4U DIRECTORY=dump_dir DUMPFILE=expdp_testogg.dmp schemas=testogg
[oracle@ogg2 goldengate]$ sqlplus / as sysdba
SQL> alter user testogg identified by test2017 account unlock;
SQL> truncate table testogg.t1;
Table truncated
8、分别在两端配置GG参数(操作基本相同,具体根据实际情况配置)
[oracle@ogg2 goldengate]$ cd $GG_HOME
[oracle@ogg2 goldengate]$ ./ggsci
GGSCI (ogg1) 1> create subdirs
Creating subdirectories under current directory /u01/app/goldengate
Parameter files /u01/app/goldengate/dirprm: created
Report files /u01/app/goldengate/dirrpt: created
Checkpoint files /u01/app/goldengate/dirchk: created
Process status files /u01/app/goldengate/dirpcs: created
SQL script files /u01/app/goldengate/dirsql: created
Database definitions files /u01/app/goldengate/dirdef: created
Extract data files /u01/app/goldengate/dirdat: created
Temporary files /u01/app/goldengate/dirtmp: created
Credential store files /u01/app/goldengate/dircrd: created
Masterkey wallet files /u01/app/goldengate/dirwlt: created
Dump files /u01/app/goldengate/dirdmp: created
GGSCI (ogg1) 2> edit params mgr
GGSCI (ogg1) 3> view params mgr
PORT 7809
autorestart er *,retries 5,waitminutes 2
ACCESSRULE, PROG REPLICAT, IPADDR 192.168.91.138, ALLOW // IP为目标端地址
GGSCI (ogg1) 4> start mgr
Manager started.
GGSCI (ogg1) 5> info mgr
Manager is running (IP port ogg1.7809, Process ID 15567).
GGSCI (ogg1) 6> dblogin userid ogg,password ogg
Successfully logged into database.
GGSCI (ogg1 as ogg@ggss) 7> edit params ./GLOBAL
GGSCI (ogg1 as ogg@ggss) 8> view params ./GLOBAL
ggschema ogg
checkpointtable ogg.checkpoint
9、配置两端GG参数
9.1 OGG1端配置
(a) 在测试表上增加补充日志
[oracle@ogg1 goldengate]$ cd $GG_HOME
[oracle@ogg1 goldengate]$ ./ggsci
GGSCI (ogg1) 1> dblogin userid ogg, password ogg
Successfully logged into database.
GGSCI (ogg1 as ogg@ggss) 2> add trandata testogg.*
2017-04-06 01:39:26 WARNING OGG-06439 No unique key is defined for table T1. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Logging of supplemental redo data enabled for table TESTOGG.T1.
TRANDATA for scheduling columns has been added on table 'TESTOGG.T1'.
TRANDATA for instantiation CSN has been added on table 'TESTOGG.T1'.
(b) 增加 checkpoint 表
GGSCI (ogg1 as ogg@ggss) 3> add checkpointtable ogg.checkpoint
Successfully created checkpoint table ogg.checkpoint.
注:如果没添加此表,报错ERROR OGG-00446 OGG-01668
GGSCI (ogg1 as ogg@ggss) 4> exit
(c) 正向抽取进程:
[oracle@ogg1 goldengate]$ ./ggsci
GGSCI (ogg1) 1> add extract eddl1, tranlog, begin now;
EXTRACT added.
GGSCI (ogg1) 2> add exttrail ./dirdat/aa extract eddl1, megabytes 100
EXTTRAIL added.
GGSCI (ogg1) 3> edit params eddl1
GGSCI (ogg1) 4> view params eddl1
extract eddl1
userid ogg, password ogg
ddl include all
ddloptions report
ddloptions addtrandata
ddloptions getreplicates
exttrail ./dirdat/aa
TRANLOGOPTIONS EXCLUDEUSER ogg
table testogg.*;
注:如果没添加 TRANLOGOPTIONS EXCLUDEUSER ogg 配置,会导致数据重复插入
(d) 正向投递进程:
GGSCI (ogg1) 5> add extract pddl1, exttrailsource ./dirdat/aa
EXTRACT added.
GGSCI (ogg1) 6> add rmttrail ./dirdat/bb, extract pddl1, megabytes 100
RMTTRAIL added.
GGSCI (ogg1) 7> edit params pddl1
GGSCI (ogg1) 8> view params pddl1
extract pddl1
userid ogg, password ogg
rmthost 192.168.91.138, mgrport 7809
rmttrail ./dirdat/bb
table testogg.*;
(e) 反向复制进程:
GGSCI (ogg1) 9> add replicat rddl2 exttrail ./dirdat/dd,checkpointtable ogg.checkpoint
REPLICAT added.
GGSCI (ogg1) 10> edit params rddl2
GGSCI (ogg1) 11> view params rddl2
replicat rddl2
userid ogg,password ogg
ddl include all
ddloptions report
ddloptions updatemetadata
ddlerror default ignore retryop
discardfile ./dirrpt/rddl.dsc, purge
DBOPTIONS DEFERREFCONST
DBOPTIONS SUPPRESSTRIGGERS
map testogg.*, target testogg.*;
9.2 OGG2端
(a) 在测试表上增加补充日志
[oracle@ogg2 goldengate]$ cd $GG_HOME
[oracle@ogg2 goldengate]$ ./ggsci
GGSCI (ogg2) 1> dblogin userid ogg, password ogg
fully logged into database.
GGSCI (ogg2 as ogg@ggtt) 2> add trandata testogg.*
2017-04-06 01:45:51 WARNING OGG-06439 No unique key is defined for table T1. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Logging of supplemental redo data enabled for table TESTOGG.T1.
TRANDATA for scheduling columns has been added on table 'TESTOGG.T1'.
TRANDATA for instantiation CSN has been added on table 'TESTOGG.T1'.
(b) 增加 checkpoint 表
GGSCI (ogg2 as ogg@ggtt) 3> add checkpointtable ogg.checkpoint
Successfully created checkpoint table ogg.checkpoint.
GGSCI (ogg2 as ogg@ggtt) 4>exit
(c) 反向抽取进程:
[oracle@ogg2 goldengate]$ ./ggsci
GGSCI (ogg2) 1> add extract eddl2, tranlog, begin now;
EXTRACT added.
GGSCI (ogg2) 2> add exttrail ./dirdat/cc extract eddl2, megabytes 100
EXTTRAIL added.
GGSCI (ogg2) 3> edit params eddl2
GGSCI (ogg2) 4> view params eddl2
extract eddl2
userid ogg,password ogg
ddl include all
ddloptions report
ddloptions addtrandata
ddloptions getreplicates
exttrail ./dirdat/cc
TRANLOGOPTIONS EXCLUDEUSER ogg
table testogg.*;
(d) 反向投递进程:
GGSCI (ogg2) 5> add extract pddl2, exttrailsource ./dirdat/cc
EXTRACT added.
GGSCI (ogg2) 6> add rmttrail ./dirdat/dd, extract pddl2, megabytes 100
RMTTRAIL added.
GGSCI (ogg2) 7> edit params pddl2
GGSCI (ogg2) 8> view params pddl2
extract pddl2
userid ogg, password ogg
rmthost 192.168.91.137, mgrport 7809
rmttrail ./dirdat/dd
table testogg.*;
(e) 正向复制进程:
GGSCI (ogg2) 9> add replicat rddl1 exttrail ./dirdat/bb,checkpointtable ogg.checkpoint
REPLICAT added.
GGSCI (ogg2) 10> edit params rddl1
GGSCI (ogg2) 11> view params rddl1
replicat rddl1
userid ogg, password ogg
ddl include all
ddloptions report
ddloptions updatemetadata
ddlerror default ignore retryop
discardfile ./dirrpt/rddl.dsc, purge
DBOPTIONS DEFERREFCONST
DBOPTIONS SUPPRESSTRIGGERS
map testogg.*, target testogg.*;
10、启动顺序
eddl1 --> pddl1 --> rddl1 --> eddl2 --> pddl2 --> rddl2
OGG1
start extract eddl1
start extract pddl1
OGG2
start replicat rddl1
OGG2
start extract eddl2
start extract pddl2
OGG1
start replicat rddl2
11、检查进程状态
OGG1:
GGSCI (ogg1 as ogg@ggss) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EDDL1 00:00:00 00:00:09
EXTRACT RUNNING PDDL1 00:00:00 00:00:08
REPLICAT RUNNING RDDL2 01:01:40 00:00:00
OGG2:
GGSCI (ogg2 as ogg@ggtt) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EDDL2 00:00:00 00:00:02
EXTRACT RUNNING PDDL2 00:00:00 00:00:07
REPLICAT RUNNING RDDL1 00:00:00 00:00:01
12、验证数据
12.1 查看初始化是否同步,查看下ggtt端的T1
[oracle@ogg2 ~]$ sqlplus testogg/testogg
SQL> select count(*) from t1;
COUNT(*)
----------
0
12.2 正向
ggss端:
[oracle@ogg1 ~]$ sqlplus testogg/testogg
SQL> create table test1(id int primary key);
Table created.
SQL> insert into test1 values (1);
1 row created.
SQL> commit;
Commit complete.
SQL> select count(*) from test1;
COUNT(*)
----------
1
ggtt端:
[oracle@ogg2 ~]$ sqlplus testogg/testogg
SQL> desc test1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
SQL> select * from test1;
ID
----------
1
12.3 反向
ggtt端:
[oracle@ogg2 ~]$ sqlplus testogg/test2017
SQL> create table test2(id int primary key);
Table created.
SQL> insert into test2 values (2);
1 row created.
SQL> commit;
Commit complete.
SQL> select * from test2;
ID
----------
2
ggss端:
[oracle@ogg1 ~]$ sqlplus testogg/testogg
SQL> desc test2
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER(38)
SQL> select * from test2;
ID
----------
2
搭建部分到此结束
补充:
1.确保配置过程中没有DDL,应用仅连接至正向抽取端
2.配置抽取进程
3.配置投递进程
4.启动抽取投递进程
5.exp imp expdp,impdp rman完成目标端初始化
6.启动目标端复制进程
7.配置反向复制链路
8.配置两端开启DDL
停止OGG
OGG2
stop replicat rddl1
OGG1
stop extract pddl1
stop extract eddl1
OGG1
stop replicat rddl2
OGG2
stop extract pddl2
stop extract eddl2
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30590361/viewspace-2136786/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30590361/viewspace-2136786/
最后
以上就是执着玫瑰为你收集整理的ogg12 oracle to oracle 双向DDL复制的全部内容,希望文章能够帮你解决ogg12 oracle to oracle 双向DDL复制所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复