GoldenGate配置(三)之DDL复制配置
【说明】 此篇续接上一篇:“GoldenGate配置(二)之双向复制配置”点击打开链接?
环境:
| Item |
Source System |
Target System |
| Platform |
Red Hat Enterprise Linux Server release 5.4 |
Red Hat Enterprise Linux Server release 5.4 |
| Hostname |
gc1 |
gc2 |
| Database |
Oracle 10.2.0.1 |
Oracle 11.2.0.1 |
| Character Set |
ZHS16GBK |
ZHS16GBK |
| ORACLE_SID |
PROD |
EMREP |
| Listener Name/Port |
LISTENER/1521 |
LISTENER/1521 |
| Goldengate User |
ogg |
ogg |
DDL复制配置
gc1:执行脚本(注意:要到/u01/app/ogg目录下执行,否则会被hang住,oracle的bug)
SQL>@marker_setup.sql; --到/u01/app/ogg目录后登陆sqlplus执行
Marker setup script?
You will be prompted for the name of a schema forthe GoldenGate database objects.
NOTE: The schema must be created prior to runningthis script.
NOTE: Stop all DDL replication before startingthis installation.?
Enter GoldenGate schema name:ogg
Marker setup table script complete, runningverification script...
Please enter the name of a schema for theGoldenGate database objects:
Setting schema name to OGG?
MARKER TABLE
-------------------------------
OK?
MARKER SEQUENCE
-------------------------------
OK?
Script complete.
SQL> alter system set recyclebin=off scope=spfile; --关闭回收站
SQL> startup force; --重启库
SQL> @ddl_setup
GoldenGateDDL Replication setup script?
Verifyingthat current user has privileges to install DDL Replication...?
You willbe prompted for the name of a schema for the GoldenGate database objects.
NOTE:The schema must be created prior to running this script.
NOTE: OnOracle 10g and up, system recycle bin must be disabled.
NOTE:Stop all DDL replication before starting this installation.?
EnterGoldenGate schema name:ogg
You willbe prompted for the mode of installation.
Toinstall or reinstall DDL replication, enter INITIALSETUP
Toupgrade DDL replication, enter NORMAL
Entermode of installation:INITIALSETUP
Working,please wait ...
Spoolingto file ddl_setup_spool.txt?
UsingOGG as a GoldenGate schema name, INITIALSETUP as a mode of installation.?
Working,please wait ...?
RECYCLEBINmust be empty.
Thisinstallation will purge RECYCLEBIN for all users.
To proceed,enter yes. To stop installation, enter no.?
Enteryes or no:yes
SQL>@role_setup
GGS Role setup script?
This script will drop and recreate the roleGGS_GGSUSER_ROLE
To use a different role name, quit this scriptand then edit the params.sql script to change the gg_role parameter to thepreferred name. (Do not run the script.)?
You will be prompted for the name of a schema forthe GoldenGate database objects.
NOTE: The schema must be created prior to runningthis script.
NOTE: Stop all DDL replication before startingthis 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 theExtract, GGSCI, and Manager processes, by using the following SQL command:?
GRANT GGS_GGSUSER_ROLE TO ?
where is the user assigned tothe GoldenGate processes.
SQL> grant GGS_GGSUSER_ROLE to ogg;
SQL> @ddl_enable
Trigger altered.?
gc2:执行脚本(同gc1上操作)
SQL>alter system set recyclebin=off scope=spfile; --关闭回收站
SQL>startup force; --重启库
SQL>@marker_setup
SQL>@ddl_setup
SQL>@role_setup
SQL>grant GGS_GGSUSER_ROLE to ogg;
SQL>@ddl_enable
gc1:配置Extract进程
GGSCI(gc1) 3> STOP EORA_1
Sending STOP request to MANAGER ...
Request Processed.?
GGSCI(gc1) 4> EDIT PARAMS EORA_1
添加红字部分:
-- Change Captur