Configure Goldengate Unidirectional Step by step
Summary
1) Create New file system for Golden Gate Home
2) Install Oracle GoldenGate software on source and target Machine and create subdirectory from GGSCI .3)Set up a GoldenGate database user at source database level.
4)Enable supplemental logging at source database level.
5) Enabling Oracle GoldenGate in source the Database
ENABLE_GOLDENGATE_REPLICATION=true
6) Configure and start change capture to GoldenGate trail files (Extract processes: primary and data pump).
7) Perform initial load to synchronize databases by database-specific or Oracle GoldenGate methods.
8) Configure and start change delivery (Replicat process).
Source
1) Set up a GoldenGate database user at source
Wallet and master key
Copy the cwallet.sso created on the target to $OGG_HOME/dirwlt
Credential Store
GGSCI (ip-10-190-170-4.eu-west-1.compute.internal) 3> add credentialstore
Credential store created in ./dircrd/.
GGSCI (ip-10-190-170-4.eu-west-1.compute.internal) 6> alter credentialstore add user SD_OGG@APPPROD, alias sd_ogg
Password:
Credential store in ./dircrd/ altered.
|
Supplemental Logging
DBLOGIN USERIDALIAS sd_ogg
ADD SCHEMATRANDATA TEST_DBA [ALLOWNONVALIDATEDKEYS]
2017-04-12 11:10:36 INFO OGG-01788 SCHEMATRANDATA has been added on schema test_dba.
2017-04-12 11:10:36 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema test_dba.
DBLOGIN USERIDALIAS sd_ogg
ADD SCHEMATRANDATA TEST_DBA [ALLOWNONVALIDATEDKEYS]
2017-04-12 11:10:36 INFO OGG-01788 SCHEMATRANDATA has been added on schema test_dba.
2017-04-12 11:10:36 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema test_dba.
GLOBALS file
GGSCHEMA SD_OGG
ENABLE_HEARTBEAT_TABLE
USE_TRAILDEFS
|
Manager process
PORT 7809
PURGEOLDEXTRACTS ./dirdat/cp*, USECHECKPOINTS, MINKEEPHOURS 12
AUTORESTART EXTRACT APP_CAP, RETRIES 6, WAITMINUTES 10, RESETMINUTES 60
AUTORESTART EXTRACT APP_PUMP, RETRIES 6, WAITMINUTES 10, RESETMINUTES 60
--ALLOWNONVALIDATEDKEYS
|
Heartbeat Table
DBLOGIN USERIDALIAS sd_ogg
ADD HEARTBEATTABLE, frequency 120, retention_time 10, purge_frequency 2
|
Extract (Capture process)
Register the extract process with the database
ADD EXTRACT TEST_CAP, INTEGRATED TRANLOG, BEGIN NOW
ADD EXTTRAIL ./dirdat/cc , EXTRACT TEST_CAP
|
TEST_CAP Parameter file
EXTRACT TEST_CAP
USERIDALIAS sd_ogg
ENCRYPTTRAIL AES256
EXTTRAIL ./dirdat/cc
TABLEEXCLUDE TEST_DBA.TC_CREDIT_LIMIT_SNAPSHOT
TABLEEXCLUDE TEST_DBA.ACCOUNT_STATUS_PARAMS
TABLEEXCLUDE TEST_DBA.IDT_ML5910G01
TABLEEXCLUDE TEST_DBA.SL_PROBLEM_PHONES
TABLEEXCLUDE TEST_DBA.IDT_ML5910G03
TABLE TEST_DBA.*
|
Register the extract process with the database
DBLOGIN USERIDALIAS sd_ogg
register extract TEST_cap database
2017-04-12 11:14:10 INFO OGG-02003 Extract TEST_CAP successfully registered with database at SCN 25289823.
|
For Initial Load
capture SCN from Source Database
1) select Current_SCN from V$database -- on Source Database
2) Run EXPDP to a specific SCN.
userid="/ as sysdba"
DIRECTORY=dumptest
PARALLEL=4
COMPRESSION=ALL
flashback_scn=XXXXXXX
SCHEMAS=TEST_USER
METRICS=Y
DUMPFILE=exp_TEST_USER_23Apr_%U.dmp
logfile=explog_TEST_USER_23Apr.log
Point EXTRACT to that SCN and start it
ALTER TEST_CAP, SCN XXXXX
INFO TEST_APPP DETAIL
START TEST_CAP
|
Extract (Pump process)
Commands to create EXTRACT process:
ADD EXTRACT TEST_PUMP, EXTTRAILSOURCE ./dirdat/oc
|
TEST_PUMP Parameter file:
EXTRACT TEST_PUMP
PASSTHRU
RMTHOST ip-10-190-170-4.eu-west-1.compute.internal, MGRPORT 7809
RMTTRAIL ./dirdat/cp
TABLE TEST_DBA.*;
|
Start PUMP
START TEST_PUMP
|
Target
Wallet and master key
GGSCI (ip-10-190-170-4.eu-west-1.compute.internal)
2> create wallet
Created wallet at location 'dirwlt'.
Opened wallet at location 'dirwlt'.
GGSCI (ip-10-190-170-4.eu-west-1.compute.internal)
4> add masterkey
Master key ' OGG_DEFAULT_MASTERKEY' added to wallet
at location 'dirwlt'.
|
Credential Store
GGSCI (ip-10-190-170-4.eu-west-1.compute.internal)
3> add credentialstore
Credential store created in ./dircrd/.
alter credentialstore add user SD_OGG@ords1, alias sd_ogg domain ords1
Password:
Credential store in ./dircrd/ altered.
alter credentialstore add user SD_OGG@ords2, alias sd_ogg domain ords2
Password:
Credential store in ./dircrd/ altered.
|
GLOBALS file
GGSCHEMA SD_OGG
ENABLE_HEARTBEAT_TABLE
USE_TRAILDEFS
--ALLOWNONVALIDATEDKEYS
|
Manager process
PORT 7809
DYNAMICPORTLIST 7810-7829
PURGEOLDEXTRACTS ./dirdat/cp*, USECHECKPOINTS,
MINKEEPHOURS 12
AUTORESTART REPLICAT APP_DEL, RETRIES 6, WAITMINUTES
10, RESETMINUTES 60
|
Checkpoint Table
DBLOGIN USERIDALIAS sd_ogg domain rds1
add checkpointtable sd_ogg.checkpointtable
|
Heartbeat Table
DBLOGIN USERIDALIAS sd_ogg domain rds1
ADD HEARTBEATTABLE, frequency 120, retention_time
10, purge_frequency 2
|
Replicat
Commands:
ADD REPLICAT TEST_DEL, EXTTRAIL ./dirdat/cp,
CHECKPOINTTABLE sd_ogg.checkpointtable
|
APP_DELIVERY
Parameter file
REPLICAT TEST_DEL
--HANDLECOLLISIONS
USERIDALIAS sd_ogg
MAP APP_DBA.*, TARGET APP01PRD_APP_DBA.*;
--MAP pdb2.soe2.logon, target pdb2_soe2.logon
keycols(logon_id);
BATCHSQL BATCHESPERQUEUE 100, OPSPERBATCH 2000
|
Start
REPLICAT process
START TEST_DEL
|
No comments:
Post a Comment