GoldenGate部署测试

GoldenGate部署

部署环境信息
 
主机关系    操作系统    数据库版本    GoldenGate版本    IP地址    主机名称      
源库主机    CentOS release 6.3    10.2.0.1.0    Linux_x64_Oracle10g    192.168.0.40    Centos-1      
目标库主机    Win7    11.2.0.1.0    Windows_x64_Oracle11g    192.168.0.222    WIN-9SENEMLK230     

安装步骤:
在源库主机上操作步骤:
 [oracle@centos-1 ggate]$ unzip fbo_ggs_Linux_x64_ora10g_64bit.zip
Archive:  fbo_ggs_Linux_x64_ora10g_64bit.zip
  inflating: fbo_ggs_Linux_x64_ora10g_64bit.tar 
  inflating: OGG_WinUnix_Rel_Notes_11.1.1.1.2.pdf 
  inflating: Oracle_GoldenGate_11.1.1.1_README.txt 
[oracle@centos-1 ggate]$ ls
fbo_ggs_Linux_x64_ora10g_64bit.tar  fbo_ggs_Linux_x64_ora10g_64bit.zip  OGG_WinUnix_Rel_Notes_11.1.1.1.2.pdf  Oracle_GoldenGate_11.1.1.1_README.txt
[oracle@centos-1 ggate]$ pwd
/opt/oracle/ggate
[oracle@centos-1 ggate]$ tar -xvf fbo_ggs_Linux_x64_ora10g_64bit.tar
bcpfmt.tpl
bcrypt.txt
cfg/
cfg/MPMetadataSchema.xsd
cfg/Config.properties
cfg/ProfileConfig.xml
cfg/password.properties
cfg/mpmetadata.xml
cfg/jps-config-jse.xml
chkpt_ora_create.sql
cobgen
convchk
db2cntl.tpl
ddl_access.tpl
ddl_cleartrace.sql
ddlcob
ddl_db2_os390.tpl
ddl_db2.tpl
ddl_ddl2file.sql
ddl_disable.sql
ddl_enable.sql
ddl_filter.sql
ddlgen
ddl_informix.tpl
ddl_mss.tpl
ddl_mysql.tpl
ddl_nopurgeRecyclebin.sql
ddl_nssql.tpl
ddl_ora10.sql
ddl_ora10upCommon.sql
ddl_ora11.sql
ddl_ora9.sql
ddl_oracle.tpl
ddl_pin.sql
ddl_purgeRecyclebin.sql
ddl_remove.sql
ddl_session1.sql
ddl_session.sql
ddl_setup.sql
ddl_sqlmx.tpl
ddl_status.sql
ddl_staymetadata_off.sql
ddl_staymetadata_on.sql
ddl_sybase.tpl
ddl_tandem.tpl
ddl_tracelevel.sql
ddl_trace_off.sql
ddl_trace_on.sql
defgen
demo_more_ora_create.sql
demo_more_ora_insert.sql
demo_ora_create.sql
demo_ora_insert.sql
demo_ora_lob_create.sql
demo_ora_misc.sql
demo_ora_pk_befores_create.sql
demo_ora_pk_befores_insert.sql
demo_ora_pk_befores_updates.sql
dirjar/
dirjar/oraclepki.jar
dirjar/jps-unsupported-api.jar
dirjar/fmw_audit.jar
dirjar/spring-security-cas-client-3.0.1.RELEASE.jar
dirjar/jps-manifest.jar
dirjar/xstream-1.3.jar
dirjar/monitor-common.jar
dirjar/commons-logging-1.0.4.jar
dirjar/org.springframework.jdbc-3.0.0.RELEASE.jar
dirjar/jps-upgrade.jar
dirjar/org.springframework.core-3.0.0.RELEASE.jar
dirjar/org.springframework.aop-3.0.0.RELEASE.jar
dirjar/org.springframework.web-3.0.0.RELEASE.jar
dirjar/ldapjclnt11.jar
dirjar/jmxremote_optional-1.0-b02.jar
dirjar/spring-security-acl-3.0.1.RELEASE.jar
dirjar/jps-wls.jar
dirjar/identityutils.jar
dirjar/identitystore.jar
dirjar/org.springframework.context-3.0.0.RELEASE.jar
dirjar/jsr250-api-1.0.jar
dirjar/jacc-spi.jar
dirjar/jagent.jar
dirjar/org.springframework.expression-3.0.0.RELEASE.jar
dirjar/org.springframework.context.support-3.0.0.RELEASE.jar
dirjar/spring-security-core-3.0.1.RELEASE.jar
dirjar/jps-api.jar
dirjar/org.springframework.test-3.0.0.RELEASE.jar
dirjar/osdt_core.jar
dirjar/jps-ee.jar
dirjar/osdt_cert.jar
dirjar/log4j-1.2.15.jar
dirjar/org.springframework.aspects-3.0.0.RELEASE.jar
dirjar/org.springframework.instrument-3.0.0.RELEASE.jar
dirjar/jps-common.jar
dirjar/spring-security-config-3.0.1.RELEASE.jar
dirjar/jps-mbeans.jar
dirjar/xmlparserv2.jar
dirjar/commons-codec-1.3.jar
dirjar/xpp3_min-1.1.4c.jar
dirjar/spring-security-web-3.0.1.RELEASE.jar
dirjar/jps-patching.jar
dirjar/spring-security-taglibs-3.0.1.RELEASE.jar
dirjar/org.springframework.orm-3.0.0.RELEASE.jar
dirjar/slf4j-log4j12-1.4.3.jar
dirjar/org.springframework.beans-3.0.0.RELEASE.jar
dirjar/jdmkrt-1.0-b02.jar
dirjar/jps-internal.jar
dirjar/slf4j-api-1.4.3.jar
dirjar/org.springframework.asm-3.0.0.RELEASE.jar
dirjar/org.springframework.transaction-3.0.0.RELEASE.jar
dirjar/osdt_xmlsec.jar
emsclnt
extract
freeBSD.txt
ggMessage.dat
ggsci
help.txt
jagent.sh
keygen
libicudata.so.38
libicui18n.so.38
libicuuc.so.38
libxerces-c.so.28
libxml2.txt
logdump
marker_remove.sql
marker_setup.sql
marker_status.sql
mgr
notices.txt
params.sql
prvtclkm.plb
pw_agent_util.sh
remove_seq.sql
replicat
retrace
reverse
role_setup.sql
sequence.sql
server
sqlldr.tpl
tcperrs
UserExitExamples/
UserExitExamples/ExitDemo_lobs/
UserExitExamples/ExitDemo_lobs/Makefile_lob.SOLARIS
UserExitExamples/ExitDemo_lobs/readme.txt
UserExitExamples/ExitDemo_lobs/exitdemo_lob.vcproj
UserExitExamples/ExitDemo_lobs/Makefile_lob.AIX
UserExitExamples/ExitDemo_lobs/Makefile_lob.LINUX
UserExitExamples/ExitDemo_lobs/Makefile_lob.HPUX
UserExitExamples/ExitDemo_lobs/exitdemo_lob.c
UserExitExamples/ExitDemo/
UserExitExamples/ExitDemo/exitdemo.c
UserExitExamples/ExitDemo/readme.txt
UserExitExamples/ExitDemo/Makefile_exit_demo.HPUX
UserExitExamples/ExitDemo/Makefile_exit_demo.AIX
UserExitExamples/ExitDemo/Makefile_exit_demo.SOLARIS
UserExitExamples/ExitDemo/Makefile_exit_demo.LINUX
UserExitExamples/ExitDemo/Makefile_exit_demo.HP_OSS
UserExitExamples/ExitDemo/exitdemo.vcproj
UserExitExamples/ExitDemo_pk_befores/
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.SOLARIS
UserExitExamples/ExitDemo_pk_befores/readme.txt
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.HPUX
UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.c
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.LINUX
UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.vcproj
UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.AIX
UserExitExamples/ExitDemo_more_recs/
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.SOLARIS
UserExitExamples/ExitDemo_more_recs/readme.txt
UserExitExamples/ExitDemo_more_recs/exitdemo_more_recs.c
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.AIX
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.HPUX
UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.LINUX
UserExitExamples/ExitDemo_more_recs/exitdemo_more_recs.vcproj
UserExitExamples/ExitDemo_passthru/
UserExitExamples/ExitDemo_passthru/Makefile_passthru.HPUX
UserExitExamples/ExitDemo_passthru/Makefile_passthru.AIX
UserExitExamples/ExitDemo_passthru/exitdemo_passthru.c
UserExitExamples/ExitDemo_passthru/readme.txt
UserExitExamples/ExitDemo_passthru/Makefile_passthru.SOLARIS
UserExitExamples/ExitDemo_passthru/Makefile_passthru.LINUX
UserExitExamples/ExitDemo_passthru/exitdemopassthru.vcproj
UserExitExamples/ExitDemo_passthru/Makefile_passthru.HP_OSS
usrdecs.h
zlib.txt
[oracle@centos-1 ggate]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 16 10:30:07 2013
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
10:30:07 SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence     6418
Current log sequence           6429
10:30:15 SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
10:30:39 SQL> startup mount;
ORACLE instance started.
Total System Global Area 2449473536 bytes
Fixed Size                  2022728 bytes
Variable Size             167772856 bytes
Database Buffers         2264924160 bytes
Redo Buffers               14753792 bytes
Database mounted.
10:30:49 SQL> alter database archivelog;
Database altered.
Elapsed: 00:00:00.03
10:30:58 SQL> alter database open;
Database altered.
Elapsed: 00:00:04.55
10:31:08 SQL> select supplemental_log_data_min from v$database;

SUPPLEME
--------
NO

Elapsed: 00:00:00.01
10:31:43 SQL> alter database add supplemental log data;

Database altered.

Elapsed: 00:00:00.02
10:32:03 SQL> create user goldengate identified by goldengate;

User created.

Elapsed: 00:00:00.37
10:34:03 SQL> grant select any table,connect,select any dictionary to goldengate;

Grant succeeded.

Elapsed: 00:00:00.02
10:36:46 SQL> grant dba to goldengate;

Grant succeeded.

Elapsed: 00:00:00.00
10:36:56 SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@centos-1 ggate]$ id
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
[oracle@centos-1 ggate]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x64, 64bit (optimized), Oracle 10g on Oct  4 2011 23:50:20
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.

GGSCI (centos-1) 2> create subdirs

Creating subdirectories under current directory /opt/oracle/ggate

Parameter files                /opt/oracle/ggate/dirprm: created
Report files                   /opt/oracle/ggate/dirrpt: created
Checkpoint files               /opt/oracle/ggate/dirchk: created
Process status files           /opt/oracle/ggate/dirpcs: created
SQL script. files               /opt/oracle/ggate/dirsql: created
Database definitions files     /opt/oracle/ggate/dirdef: created
Extract data files             /opt/oracle/ggate/dirdat: created
Temporary files                /opt/oracle/ggate/dirtmp: created
Veridata files                 /opt/oracle/ggate/dirver: created
Veridata Lock files            /opt/oracle/ggate/dirver/lock: created
Veridata Out-Of-Sync files     /opt/oracle/ggate/dirver/oos: created
Veridata Out-Of-Sync XML files /opt/oracle/ggate/dirver/oosxml: created
Veridata Parameter files       /opt/oracle/ggate/dirver/params: created
Veridata Report files          /opt/oracle/ggate/dirver/report: created
Veridata Status files          /opt/oracle/ggate/dirver/status: created
Veridata Trace files           /opt/oracle/ggate/dirver/trace: created
Stdout files                   /opt/oracle/ggate/dirout: created


GGSCI (centos-1) 3> info all

Program     Status      Group       Lag           Time Since Chkpt
MANAGER     STOPPED                                          

GGSCI (centos-1) 4> edit params mgr
port 7809
~
"dirprm/mgr.prm" [New] 1L, 10C written

GGSCI (centos-1) 6> start mgr

Manager started.

GGSCI (centos-1) 7> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          
目标库操作如下:
C:\Users\Administrator>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 星期二 7月 16 09:35:57 2013
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> archive log list
数据库日志模式             非存档模式
自动存档             禁用
存档终点            USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列     15
当前日志序列           17
SQL> shutdown immediate;
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup mount;
ORACLE 例程已经启动。
Total System Global Area 1352876032 bytes
Fixed Size                  2175568 bytes
Variable Size             989859248 bytes
Database Buffers          352321536 bytes
Redo Buffers                8519680 bytes
数据库装载完毕。
SQL> alter database archivelog;
数据库已更改。
SQL> alter database open;
数据库已更改。
SQL> archive log list
数据库日志模式            存档模式
自动存档             启用
存档终点            USE_DB_RECOVERY_FILE_DEST
最早的联机日志序列     15
下一个存档日志序列   17
当前日志序列           17
SQL> create user goldengate identified by goldengate;
用户已创建。
SQL> grant connect,resource,select any table,select any dictionary to goldengate;
授权成功。
SQL> grant dba to goldengate;
授权成功。
SQL> select supplemental_log_data_min from v$database;
SUPPLEME
--------
NO
SQL> alter database add supplemental log data;
数据库已更改。
SQL> exit
从 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开
在目标端win7下解压ogg112101_ggs_Windows_x64_ora11g_64bit.zip 在解压目录下找到ggsci.exe双击打开ggsci工具命令行。
GGSCI (WIN-9SENEMLK230) 57> create subdirs

Creating subdirectories under current directory /opt/oracle/ggate

Parameter files                /opt/oracle/ggate/dirprm: created
Report files                   /opt/oracle/ggate/dirrpt: created
Checkpoint files               /opt/oracle/ggate/dirchk: created
Process status files           /opt/oracle/ggate/dirpcs: created
SQL script. files               /opt/oracle/ggate/dirsql: created
Database definitions files     /opt/oracle/ggate/dirdef: created
Extract data files             /opt/oracle/ggate/dirdat: created
Temporary files                /opt/oracle/ggate/dirtmp: created
Veridata files                 /opt/oracle/ggate/dirver: created
Veridata Lock files            /opt/oracle/ggate/dirver/lock: created
Veridata Out-Of-Sync files     /opt/oracle/ggate/dirver/oos: created
Veridata Out-Of-Sync XML files /opt/oracle/ggate/dirver/oosxml: created
Veridata Parameter files       /opt/oracle/ggate/dirver/params: created
Veridata Report files          /opt/oracle/ggate/dirver/report: created
Veridata Status files          /opt/oracle/ggate/dirver/status: created
Veridata Trace files           /opt/oracle/ggate/dirver/trace: created
Stdout files                   /opt/oracle/ggate/dirout: created


GGSCI (WIN-9SENEMLK230) 57> info all

Program     Status      Group       Lag           Time Since Chkpt
MANAGER     STOPPED                                          

GGSCI (WIN-9SENEMLK230) 57>edit params mgr
port 7809
~
"dirprm/mgr.prm" [New] 1L, 10C written
GGSCI (WIN-9SENEMLK230) 57> start mgr
Manager started.
GGSCI (WIN-9SENEMLK230) 57> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING                                          
GGSCI (WIN-9SENEMLK230) 102> dblogin userid goldengate,password goldengate
Successfully logged into database.
GGSCI (WIN-9SENEMLK230) 102> add checkpointtable ogg.checkpoint
GGSCI (WIN-9SENEMLK230) 102> add replicat rep1,exttrail C:\Oracle\product\ggate\dirdat\lt,begin now,checkpointtable goldengate.checkpoint
GGSCI (WIN-9SENEMLK230) 102>edit params rep1
REPLICAT REP1
ASSUMETARGETDEFS
userid goldengate,password goldengate
discardfile C:\Oracle\product\ggate\dirdat\rep1_discard.txt,append, megabytes 10
DDL INCLUDE MAPPED
DDLERROR DEFAULT IGNORE RETRYOP
map netinvoice.* , target netinvoice.*;
接着在源库上操作
GGSCI (centos-1) 10> add extract ext1,tranlog,begin now
EXTRACT added.

GGSCI (centos-1) 11> info all

Program     Status      Group       Lag           Time Since Chkpt

MANAGER     RUNNING                                          
EXTRACT     STOPPED     EXT1        00:00:00      00:00:02   

GGSCI (centos-1) 13> edit params ext1
extract ext1
userid goldengate@NINVOICE, password goldengate
rmthost 192.168.0.222, mgrport 7809
rmttrail 'C:\Oracle\product\ggate\dirdat\lt'
ddl include mapped objname netinvoice.*;
table netinvoice.*;
~
"dirprm/ext1.prm" [New] 6L, 203C written

 [oracle@centos-1 ggate]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 16 11:16:05 2013
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

11:18:41 SQL> @marker_setup.sql

Marker setup 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:goldengate
Elapsed: 00:00:00.04
Marker setup table script. complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GOLDENGATE
MARKER TABLE
-------------------------------
OK
Elapsed: 00:00:00.01
MARKER SEQUENCE
-------------------------------
OK
Elapsed: 00:00:00.00
Script. complete.
11:20:04 SQL> @ddl_setup
GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
Elapsed: 00:00:00.00
You will be prompted for the name of a schema for the 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 GoldenGate schema name:goldengate
You will be prompted for the mode of installation.
To install or reinstall DDL replication, enter INITIALSETUP
To upgrade DDL replication, enter NORMAL
Enter mode of installation:INITIALSETUP
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.
Elapsed: 00:00:00.01
Elapsed: 00:00:00.00
Elapsed: 00:00:00.00
Elapsed: 00:00:00.01
Elapsed: 00:00:00.00
Elapsed: 00:00:00.00
Elapsed: 00:00:00.01
Elapsed: 00:00:00.00
Elapsed: 00:00:00.01
Using GOLDENGATE as a GoldenGate schema name, INITIALSETUP as a mode of installation.
Working, please wait ...
BEGIN
ERROR at line 1:
ORA-20783:
GoldenGate DDL Replication setup:
*** RECYCLEBIN must be turned off.
*** For 10gr2, set RECYCLEBIN in parameter file to OFF. For 10gr1, set _RECYCLEBIN in parameter file to FALSE. Then
restart database and installation.
ORA-06512: at line 19
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
 [oracle@centos-1 ggate]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 16 11:22:03 2013
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
11:23:00 SQL> show parameter recyc

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
buffer_pool_recycle                  string
db_recycle_cache_size                big integer 0
recyclebin                           string      on
11:24:23 SQL> alter system set recyclebin = off;

System altered.

Elapsed: 00:00:00.01
11:24:57 SQL> show parameter recycle

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
buffer_pool_recycle                  string
db_recycle_cache_size                big integer 0
recyclebin                           string      OFF
11:25:03 SQL> purge recyclebin;

Recyclebin purged.

Elapsed: 00:00:00.02
11:25:11 SQL> @ddl_setup

GoldenGate DDL Replication setup script
Verifying that current user has privileges to install DDL Replication...
Elapsed: 00:00:00.00
You will be prompted for the name of a schema for the 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 GoldenGate schema name:goldengate

You will be prompted for the mode of installation.
To install or reinstall DDL replication, enter INITIALSETUP
To upgrade DDL replication, enter NORMAL
Enter mode of installation:INITIALSETUP

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.
Elapsed: 00:00:00.00
Elapsed: 00:00:00.02
Elapsed: 00:00:00.00
Elapsed: 00:00:00.02
Elapsed: 00:00:00.00
Elapsed: 00:00:00.01
Elapsed: 00:00:00.00
Elapsed: 00:00:00.01
Elapsed: 00:00:00.01
Using GOLDENGATE as a GoldenGate schema name, INITIALSETUP as a mode of installation.
Working, please wait ...
Elapsed: 00:00:00.00
RECYCLEBIN must be empty.
This installation will purge RECYCLEBIN for all users.
To proceed, enter yes. To stop installation, enter no.

Enter yes or no:YES
Elapsed: 00:00:00.00
Elapsed: 00:00:05.54
DDL replication setup script. complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GOLDENGATE
DDLORA_GETTABLESPACESIZE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.01

CLEAR_TRACE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.00

CREATE_TRACE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.01

TRACE_PUT_LINE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.00

INITIAL_SETUP STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.00

DDLVERSIONSPECIFIC PACKAGE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.01

DDLREPLICATION PACKAGE STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.00

DDLREPLICATION PACKAGE BODY STATUS:

Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.00

DDL HISTORY TABLE
-----------------------------------
OK
Elapsed: 00:00:00.01

DDL HISTORY TABLE(1)
-----------------------------------
OK
Elapsed: 00:00:00.01

DDL DUMP TABLES
-----------------------------------
OK
Elapsed: 00:00:00.01

DDL DUMP COLUMNS
-----------------------------------
OK
Elapsed: 00:00:00.01

DDL DUMP LOG GROUPS
-----------------------------------
OK
Elapsed: 00:00:00.01

DDL DUMP PARTITIONS
-----------------------------------
OK
Elapsed: 00:00:00.01

DDL DUMP PRIMARY KEYS
-----------------------------------
OK
Elapsed: 00:00:00.01

DDL SEQUENCE
-----------------------------------
OK
Elapsed: 00:00:00.00

GGS_TEMP_COLS
-----------------------------------
OK
Elapsed: 00:00:00.01
GGS_TEMP_UK
-----------------------------------
OK
Elapsed: 00:00:00.00
DDL TRIGGER CODE STATUS:
Line/pos             Error
-------------------- -----------------------------------------------------------------
No errors            No errors
Elapsed: 00:00:00.01
DDL TRIGGER INSTALL STATUS
-----------------------------------
OK
Elapsed: 00:00:00.02
DDL TRIGGER RUNNING STATUS
----------------------------------------------------------------------
ENABLED
Elapsed: 00:00:00.01
STAYMETADATA IN TRIGGER
----------------------------------------------------------------------
OFF
Elapsed: 00:00:00.00
DDL TRIGGER SQL TRACING
----------------------------------------------------------------------
0
Elapsed: 00:00:00.00
DDL TRIGGER TRACE LEVEL
----------------------------------------------------------------------
Elapsed: 00:00:00.00
LOCATION OF DDL TRACE FILE
--------------------------------------------------------------------------------------------
/opt/oracle/admin/NINVOICE/udump/ggs_ddl_trace.log
Elapsed: 00:00:00.01
Analyzing installation status...
Elapsed: 00:00:00.11
STATUS OF DDL REPLICATION
--------------------------------------------------------------------------------------------
SUCCESSFUL installation of DDL Replication software components
Elapsed: 00:00:00.00
Script. complete.
11:26:50 SQL> @role_setup
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:goldengate
Wrote file role_setup_set.txt
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.00
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
where is the user assigned to the GoldenGate processes.
11:28:13 SQL> grant ggs_ggsuser_role to goldengate;
Grant succeeded.
Elapsed: 00:00:00.02
11:28:40 SQL> @ddl_enable
Trigger altered.
Elapsed: 00:00:00.00
11:28:52 SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
[oracle@centos-1 ggate]$ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 11.1.1.1.2 OGGCORE_11.1.1.1.2_PLATFORMS_111004.2100
Linux, x64, 64bit (optimized), Oracle 10g on Oct  4 2011 23:50:20
Copyright (C) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
GGSCI (centos-1) 1> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING                                          
EXTRACT     STOPPED     EXT1        00:00:00      00:41:02   
GGSCI (centos-1) 3> dblogin userid goldengate
Password:
Successfully logged into database.
GGSCI (centos-1) 4> edit params ext1
extract ext1
userid goldengate, password goldengate
rmthost 192.168.0.222, mgrport 7809
rmttrail 'C:\Oracle\product\ggate\dirdat\lt'
ddl include mapped objname netinvoice.*;
table netinvoice.*;
~
"dirprm/ext1.prm" 6L, 203C written
GGSCI (centos-1) 5> edit params globals
GGSCHEMA GOLDENGATE

"dirprm/globals.prm" [New] 1L, 20C written

GGSCI (centos-1) 6> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING                                          
EXTRACT     STOPPED     EXT1        00:00:00      00:43:03   
GGSCI (centos-1) 2> dblogin userid goldengate
Password:
Successfully logged into database.
GGSCI (centos-1) 3> add checkpointtable  goldengate.checkpoint

Successfully created checkpoint table GOLDENGATE.CHECKPOINT.
GGSCI (centos-1) 5> add rmttrail c:\oracle\product\ggate\dirdat\lt,extract ext1
RMTTRAIL added.
GGSCI (centos-1) 2> start ext1
Sending START request to MANAGER ...
EXTRACT EXT1 starting
GGSCI (centos-1) 3> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING                                          
EXTRACT     RUNNING     EXT1        00:00:00      03:39:18   
目标库上启动接受服务
GGSCI (WIN-9SENEMLK230) 106> start rep1
Sending START request to MANAGER ...
REPLICAT REP1 starting
GGSCI (WIN-9SENEMLK230) 107> info all
Program     Status      Group       Lag           Time Since Chkpt
MANAGER     RUNNING
REPLICAT    RUNNING     REP1        00:00:00      00:00:09
测试同步
源库操作
15:35:06 SQL> create table a (id number primary key,name varchar2(20));
Table created.
Elapsed: 00:00:00.74
15:35:37 SQL> commit;
Commit complete.
Elapsed: 00:00:00.01
15:36:12 SQL> insert into a values(1,'Deit');
1 row created.
Elapsed: 00:00:00.01
15:36:27 SQL> commit;
Commit complete.
Elapsed: 00:00:00.01
目标库上严重
SQL> conn netinvoice/netinvoice
已连接。
SQL> select * from tab;
未选定行
SQL> select * from tab;
TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
A                              TABLE
SQL> select * from a;
        ID NAME
---------- --------------------
         1 Deit
注意点:
如果防火墙没有关闭会报OGG-01224 TCP/IP error 110错误,两台主机防火墙都要关闭。
OGG-01044  The trail 'C:\Oracle\product\ggate\dirdat\lt' is not assigned to extract 'EXT1'. Assign the trail to the extract with the command "ADD EXTTRAIL/RMTTRAIL C:\Oracle\product\ggate\dirdat\lt, EXTRACT EXT1
解决:
GGSCI (centos-1) 22> add exttrail /opt/oracle/ggate/dirdat/lt  extract ext1
EXTTRAIL added.

至此已经完成部署,Oracle GoldenGate其中有很多参数需要深入研究。

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

转载于:http://blog.itpub.net/16381228/viewspace-766412/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值