Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

GoldenGate configuration

2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Ready: two virtual machines that already have a database, now shut down

-- the operation of the source database

[root@localhost ~] # su-oracle

[oracle@localhost ~] $sqlplus "/ as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 19 13:54:26 2015

Copyright (c) 1982, 2013, Oracle. All rights reserved.

Connected to an idle instance.

SQL > startup mount

ORACLE instance started.

Total System Global Area 417546240 bytes

Fixed Size 2253824 bytes

Variable Size 331353088 bytes

Database Buffers 79691776 bytes

Redo Buffers 4247552 bytes

Database mounted.

SQL > alter database archivelog

Database altered.

SQL > alter database open

Database altered.

SQL > ALTER DATABASE ADD SUPPLEMENTAL LOG DATA

Database altered.

SQL > ALTER SYSTEM SWITCH LOGFILE

System altered.

-install GoldenGate (do the same on both machines)

[root@localhost ~] # ls

Anaconda-ks.cfg Desktop install.log.syslog ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip

[root@localhost ~] # chown oracle.oinstall ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip

[root@localhost ~] # mv ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip / home/oracle/

[root@localhost ~] # su-oracle

[oracle@localhost ~] $pwd

/ home/oracle

[oracle@localhost ~] $mkdir ogg

[oracle@localhost] $unzip ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip-d ogg/

Archive: ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip

Inflating: ogg/fbo_ggs_Linux_x64_ora11g_64bit.tar

Inflating: ogg/OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf

Inflating: ogg/Oracle GoldenGate 11.2.1.0.1 README.txt

Inflating: ogg/Oracle GoldenGate 11.2.1.0.1 README.doc

[oracle@localhost ~] $cd ogg

[oracle@localhost ogg] $tar-xvf fbo_ggs_Linux_x64_ora11g_64bit.tar

UserExitExamples/

UserExitExamples/ExitDemo_more_recs/

UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.HPUX

UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.SOLARIS

UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.LINUX

UserExitExamples/ExitDemo_more_recs/Makefile_more_recs.AIX

UserExitExamples/ExitDemo_more_recs/exitdemo_more_recs.vcproj

UserExitExamples/ExitDemo_more_recs/exitdemo_more_recs.c

UserExitExamples/ExitDemo_more_recs/readme.txt

UserExitExamples/ExitDemo_passthru/

UserExitExamples/ExitDemo_passthru/exitdemo_passthru.c

UserExitExamples/ExitDemo_passthru/exitdemopassthru.vcproj

UserExitExamples/ExitDemo_passthru/Makefile_passthru.HPUX

UserExitExamples/ExitDemo_passthru/Makefile_passthru.AIX

UserExitExamples/ExitDemo_passthru/Makefile_passthru.HP_OSS

UserExitExamples/ExitDemo_passthru/Makefile_passthru.LINUX

UserExitExamples/ExitDemo_passthru/readme.txt

UserExitExamples/ExitDemo_passthru/Makefile_passthru.SOLARIS

UserExitExamples/ExitDemo_lobs/

UserExitExamples/ExitDemo_lobs/exitdemo_lob.c

UserExitExamples/ExitDemo_lobs/Makefile_lob.HPUX

UserExitExamples/ExitDemo_lobs/Makefile_lob.SOLARIS

UserExitExamples/ExitDemo_lobs/Makefile_lob.AIX

UserExitExamples/ExitDemo_lobs/exitdemo_lob.vcproj

UserExitExamples/ExitDemo_lobs/Makefile_lob.LINUX

UserExitExamples/ExitDemo_lobs/readme.txt

UserExitExamples/ExitDemo_pk_befores/

UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.AIX

UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.LINUX

UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.c

UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.HPUX

UserExitExamples/ExitDemo_pk_befores/exitdemo_pk_befores.vcproj

UserExitExamples/ExitDemo_pk_befores/Makefile_pk_befores.SOLARIS

UserExitExamples/ExitDemo_pk_befores/readme.txt

UserExitExamples/ExitDemo/

UserExitExamples/ExitDemo/exitdemo.vcproj

UserExitExamples/ExitDemo/Makefile_exit_demo.SOLARIS

UserExitExamples/ExitDemo/Makefile_exit_demo.HP_OSS

UserExitExamples/ExitDemo/exitdemo.c

UserExitExamples/ExitDemo/Makefile_exit_demo.LINUX

UserExitExamples/ExitDemo/exitdemo_utf16.c

UserExitExamples/ExitDemo/Makefile_exit_demo.HPUX

UserExitExamples/ExitDemo/Makefile_exit_demo.AIX

UserExitExamples/ExitDemo/readme.txt

Bcpfmt.tpl

Bcrypt.txt

Cfg/

Cfg/password.properties

Cfg/MPMetadataSchema.xsd

Cfg/jps-config-jse.xml

Cfg/ProfileConfig.xml

Cfg/mpmetadata.xml

Cfg/Config.properties

Chkpt_ora_create.sql

Cobgen

Convchk

Db2cntl.tpl

Ddl_cleartrace.sql

Ddl_ddl2file.sql

Ddl_disable.sql

Ddl_enable.sql

Ddl_filter.sql

Ddl_nopurgeRecyclebin.sql

Ddl_ora10.sql

Ddl_ora10upCommon.sql

Ddl_ora11.sql

Ddl_ora9.sql

Ddl_pin.sql

Ddl_purgeRecyclebin.sql

Ddl_remove.sql

Ddl_session.sql

Ddl_session1.sql

Ddl_setup.sql

Ddl_status.sql

Ddl_staymetadata_off.sql

Ddl_staymetadata_on.sql

Ddl_trace_off.sql

Ddl_trace_on.sql

Ddl_tracelevel.sql

Ddlcob

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/xmlparserv2.jar

Dirjar/fmw_audit.jar

Dirjar/jps-internal.jar

Dirjar/org.springframework.jdbc-3.0.0.RELEASE.jar

Dirjar/org.springframework.context-3.0.0.RELEASE.jar

Dirjar/jps-upgrade.jar

Dirjar/oraclepki.jar

Dirjar/org.springframework.transaction-3.0.0.RELEASE.jar

Dirjar/xstream-1.3.jar

Dirjar/jsr250-api-1.0.jar

Dirjar/org.springframework.beans-3.0.0.RELEASE.jar

Dirjar/ldapjclnt11.jar

Dirjar/spring-security-cas-client-3.0.1.RELEASE.jar

Dirjar/jps-manifest.jar

Dirjar/org.springframework.aspects-3.0.0.RELEASE.jar

Dirjar/identityutils.jar

Dirjar/org.springframework.aop-3.0.0.RELEASE.jar

Dirjar/jacc-spi.jar

Dirjar/jmxremote_optional-1.0-b02.jar

Dirjar/slf4j-log4j12-1.4.3.jar

Dirjar/jps-api.jar

Dirjar/slf4j-api-1.4.3.jar

Dirjar/identitystore.jar

Dirjar/jps-unsupported-api.jar

Dirjar/osdt_xmlsec.jar

Dirjar/org.springframework.orm-3.0.0.RELEASE.jar

Dirjar/jagent.jar

Dirjar/commons-codec-1.3.jar

Dirjar/jps-ee.jar

Dirjar/spring-security-taglibs-3.0.1.RELEASE.jar

Dirjar/log4j-1.2.15.jar

Dirjar/osdt_core.jar

Dirjar/spring-security-acl-3.0.1.RELEASE.jar

Dirjar/xpp3_min-1.1.4c.jar

Dirjar/spring-security-web-3.0.1.RELEASE.jar

Dirjar/spring-security-core-3.0.1.RELEASE.jar

Dirjar/spring-security-config-3.0.1.RELEASE.jar

Dirjar/jps-mbeans.jar

Dirjar/org.springframework.test-3.0.0.RELEASE.jar

Dirjar/jdmkrt-1.0-b02.jar

Dirjar/jps-common.jar

Dirjar/org.springframework.web-3.0.0.RELEASE.jar

Dirjar/jps-patching.jar

Dirjar/jps-wls.jar

Dirjar/commons-logging-1.0.4.jar

Dirjar/org.springframework.expression-3.0.0.RELEASE.jar

Dirjar/org.springframework.instrument-3.0.0.RELEASE.jar

Dirjar/monitor-common.jar

Dirjar/osdt_cert.jar

Dirjar/org.springframework.asm-3.0.0.RELEASE.jar

Dirjar/org.springframework.context.support-3.0.0.RELEASE.jar

Dirjar/org.springframework.core-3.0.0.RELEASE.jar

Dirprm/

Dirprm/jagent.prm

Emsclnt

Extract

FreeBSD.txt

GgMessage.dat

Ggcmd

Ggsci

Help.txt

Jagent.sh

Keygen

Libantlr3c.so

Libdb-5.2.so

Libgglog.so

Libggrepo.so

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

Oggerr

Params.sql

Prvtclkm.plb

Pw_agent_util.sh

Remove_seq.sql

Replicat

Retrace

Reverse

Role_setup.sql

Sequence.sql

Server

Sqlldr.tpl

Tcperrs

Ucharset.h

Ulg.sql

Usrdecs.h

Zlib.txt

[oracle@localhost ogg] $cd

[oracle@localhost ~] $vi .bashrc

# .bashrc

# Source global definitions

If [- f / etc/bashrc]; then

. / etc/bashrc

Fi

# User specific aliases and functions

# Oracle configure profile parameters success

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.0.2/db_1

Export PATH=$ORACLE_HOME/bin:$PATH

Export ORACLE_OWNER=oracle

Export ORACLE_SID=lsora

Export ORACLE_TERM=vt100

Export THREADS_FLAG=native

Export LD_LIBRARY_PATH=/home/oracle/ogg/:$ORACLE_HOME/lib:$LD_LIBRARY_PATH

Export PATH=$ORACLE_HOME/bin:$PATH:/home/oracle/ogg

#

# change this NLS settings to suit your country:

# example:

# german_germany.we8iso8859p15, american_america.we8iso8859p2 etc.

#

Export LANG=en_US

~

~

".bashrc" 24L, 672C written

[oracle@localhost ~] $cd ogg

[oracle@localhost ogg] $ggsci

-bash: ggsci: command not found

[oracle@localhost ogg] $cd

[oracle@localhost ~] $source .bashrc

[oracle@localhost ~] $cd ogg

[oracle@localhost ogg] $ggsci

Oracle GoldenGate Command Interpreter for Oracle

Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO

Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

GGSCI (localhost.localdomain) 1 > create subdirs

Creating subdirectories under current directory / home/oracle/ogg

Parameter files / home/oracle/ogg/dirprm: already exists

Report files / home/oracle/ogg/dirrpt: created

Checkpoint files / home/oracle/ogg/dirchk: created

Process status files / home/oracle/ogg/dirpcs: created

SQL script files / home/oracle/ogg/dirsql: created

Database definitions files / home/oracle/ogg/dirdef: created

Extract data files / home/oracle/ogg/dirdat: created

Temporary files / home/oracle/ogg/dirtmp: created

Stdout files / home/oracle/ogg/dirout: created

GGSCI (localhost.localdomain) 2 > EDIT PARAMS MGR

-- This is the minimal configuration of Manager

PORT 7809

~

~

~

"dirprm/mgr.prm" [New] 2L, 60C written

GGSCI (localhost.localdomain) 3 > start mgr

Manager started.

-- prepare users and data

[oracle@localhost ~] $cd ogg

[oracle@localhost ogg] $pwd

/ home/oracle/ogg

[oracle@localhost ogg] $sqlplus "/ as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Sat Sep 19 14:40:41 2015

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 user scott account unlock

User altered.

SQL > grant resource,connect to scott

Grant succeeded.

SQL > grant select any dictionary to scott

Grant succeeded.

SQL > conn scott/tiger

ERROR:

ORA-28001: the password has expired

Changing password for scott

New password:

Retype new password:

Password changed

Connected.

SQL > @ demo_ora_create.sql

DROP TABLE tcustmer

*

ERROR at line 1:

ORA-00942: table or view does not exist

Table created.

DROP TABLE tcustord

*

ERROR at line 1:

ORA-00942: table or view does not exist

Table created.

SQL > @ demo_ora_insert.sql

1 row created.

1 row created.

1 row created.

1 row created.

Commit complete.

SQL > conn / as sysdba

Connected.

SQL > alter user system identified by oracle

User altered.

-add additional logs in the source database for the tables that need to be synchronized

GGSCI (localhost.localdomain) 4 > dblogin userid scott, password tiger

Successfully logged into database.

GGSCI (localhost.localdomain) 5 > add trandata scott.tcustmer

Logging of supplemental redo data enabled for table SCOTT.TCUSTMER.

GGSCI (localhost.localdomain) 6 > add trandata scott.tcustord

Logging of supplemental redo data enabled for table SCOTT.TCUSTORD.

-initialize load data

-- Source end:

GGSCI (localhost.localdomain) 8 > ADD EXTRACT EINILOAD, SOURCEISTABLE

EXTRACT added.

GGSCI (localhost.localdomain) 9 > edit params EINILOAD

--

-- GoldenGate Initial Data Capture

-- for TCUSTMER and TCUSTORD

--

EXTRACT EINILOAD

USERID system, PASSWORD "oracle"

RMTHOST 192.168.190.201, MGRPORT 7809

RMTTASK REPLICAT, GROUP RINILOAD

TABLE SCOTT.TCUSTMER

TABLE SCOTT.TCUSTORD

-- destination side:

GGSCI (localhost.localdomain) 1 > ADD REPLICAT RINILOAD, SPECIALRUN

REPLICAT added.

GGSCI (localhost.localdomain) 2 > edit params riniload

--

-- GoldenGate Initial Load Delivery

--

REPLICAT RINILOAD

ASSUMETARGETDEFS

USERID system, PASSWORD "oracle"

DISCARDFILE. / dirrpt/RINILOAD.dsc, PURGE

MAP scott.*, TARGET scott.*

-- start:

Start extract einiload

-- success

-configuration data real-time synchronization

-- Source end:

GGSCI (localhost.localdomain) 12 > ADD EXTRACT EORAKK, TRANLOG, BEGIN NOW, THREADS 1

EXTRACT added.

GGSCI (localhost.localdomain) 13 > EDIT PARAMS EORAKK

--

-- Change Capture parameter file to capture

-- TCUSTMER and TCUSTORD Changes

--

EXTRACT EORAKK

USERID system, PASSWORD oracle

RMTHOST 192.168.190.201, MGRPORT 7809

RMTTRAIL. / dirdat/KK

TABLE SCOTT.TCUSTMER

TABLE SCOTT.TCUSTORD

~

~

~

"dirprm/eorakk.prm" [New] 10L, 232C written

GGSCI (localhost.localdomain) 14 > ADD RMTTRAIL. / dirdat/KK, EXTRACT EORAKK, MEGABYTES 5

RMTTRAIL added.

GGSCI (localhost.localdomain) 15 > start extract eorakk

Sending START request to MANAGER...

EXTRACT EORAKK starting

-- destination side:

GGSCI (localhost.localdomain) 3 > EDIT PARAMS. / GLOBALS

CHECKPOINTTABLE system.ggschkpt

~

~

". / GLOBALS" [New] 1L, 33C written

GGSCI (localhost.localdomain) 4 > DBLOGIN USERID system, PASSWORD oracle

Successfully logged into database.

GGSCI (localhost.localdomain) 5 > ADD CHECKPOINTTABLE

ERROR: Missing checkpoint table specification.

GGSCI (localhost.localdomain) 6 > exit

[oracle@localhost ogg] $ggsci

Oracle GoldenGate Command Interpreter for Oracle

Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO

Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.

GGSCI (localhost.localdomain) 1 > DBLOGIN USERID system, PASSWORD oracle

Successfully logged into database.

GGSCI (localhost.localdomain) 2 > ADD CHECKPOINTTABLE

No checkpoint table specified, using GLOBALS specification (system.ggschkpt)...

Successfully created checkpoint table system.ggschkpt.

GGSCI (localhost.localdomain) 3 > ADD REPLICAT RORAKK, EXTTRAIL. / dirdat/KK

REPLICAT added.

GGSCI (localhost.localdomain) 4 > EDIT PARAMS RORAKK

--

-- Change Delivery parameter file to apply

-- TCUSTMER and TCUSTORD Changes

--

REPLICAT RORAKK

USERID system, PASSWORD oracle

HANDLECOLLISIONS

ASSUMETARGETDEFS

DISCARDFILE. / dirrpt/RORAKK.DSC, PURGE

MAP scott.tcustmer, TARGET scott.tcustmer

MAP scott.tcustord, TARGET scott.tcustord

~

~

"dirprm/rorakk.prm" [New] 12L, 290C written

GGSCI (localhost.localdomain) 5 > start replicat rorakk

Sending START request to MANAGER...

REPLICAT RORAKK starting

-success

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 290

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report