Architecture:
Extract: Captures changes and write in ST.
Source Trail file: Data Captured and
written.
Data Pump: It is also extract, that read ST
and send over the network.
Collector: Receive the ST and writes as RT
(Remote Trail).
Delivery: To apply changes, started as
background process by Replicate.
Manager: Manages all, default port is 7840.
Defgen: Use to generate the DDL.
Logdump: use to read the trail file.
Reverse: use to reverse the changes
applied.
Veridata: Tool to compare source and
target.
Director: Graphical tool to manage
Golden-Gate.
Basic Replication:
Enable Supplement Loging:
alter database add supplemental log data;
Enable table level supplemental loging at
table level:
ggsci> add trandata hr.employees
check from dba_log_group.
Disable trigger and cascade constraint at
target system:
select ‘alter table’ || owner || ‘.’ ||
table_name || ‘disable constraint ‘ || constraint_name || ‘;’
from dba_constraint where
delete_rule=’CASCADE’ and owner=’HR’;
select
'alter trigger '||owner||'.'||trigger_name|| ' disable ;'
from
all_triggers where owner = '&SCHEMA';
Same
query can be used to enable later !!!
NOTE:
from version 11, SUPPRESSTRIGGER & DEFERREFCONST can be use with DBOPTION
in Replicate parameter.
Info
manager : information for manager
Start
manager : to start manager
Adding
extract:
ggsci>
add extract ext, tranlog, begin now
ggsci>
add extrail disdat/L1, extract ext, megabytes 100
stop
extract ext
start
extract ext
info
extract ext
info
extract ext, detail
stat
extract ext
Data
pump:
Passthru:
to pass all without filtering
Rmthost:
remote server name
Mgrport:
manager port
Rmttrail:
to specify two character name for remote trail file.
Replicate:
HANDLECOLLISION:
to ignore if any difference between source and target tables.
ASSUMETARGETDEFS:
when source and target are same.
Advanced
Feature:
Report:
Extract and Replicate DML runtime statistics.
SEND
EXTRACT EXT REPORT
SEND
EXTRACT REP REPORT
Reportcount:
To count DML GG Proccsed since startup. Can be used in EXTRACT AND REPLICATE
parameter.
Reportrollover:
TO control report file over time.
DISCARDEFILE:
To record discard.
Discardfile
disdat/ext1.dsc append
Discardrollover
at 12:00 ON SUNDAY.
Purging
old trail file: (PURGEOLDEXTRACTS), can be used to purge old trail files..
PURGEOLDEXTRACTS
DIRDAT/*, USECHECKPOINTS, MINKEEP 2 DAYS
Autostart:
can be add in manager paremeter, for auto start.
Checkpoint
Table: By default GG maintains checkpoint file on disk to tract the transaction
processing. Best practice is to add checkpoint table in target database.
Add
in global parameter:
CHECKPOINT
TABLE GGES..CHKPT
ELSE
DBLOGIN
USERID GGER PASSWORD PASSWORD
ADD
CHECKPOINTTABLE
INFO
CHECKPINTTABLE GGER.CHKPT
Adding
DDL Replication:
Sql>
grant execute on utl_transfer to gger;
Sql>
@marker_setup.sql
Sql>
@ddl_setup.sql
Sql>
@role_setup.sql
Sql>
@ddl_enable.sql
Add
in local extract file:
DDL
INCLUDE MAPPED
Monitoring
Goldengate:
Info
all
Info
extract ext, detail ( check for sequence number, this should be current redo
log group)
Checking
LAG
>LAG
EXTRACT EXT
>SEND
EXTRACT EXT, GETLAG
>VIEW
REPORT EXT
>STATS
EXTRACT EXT
No comments:
Post a Comment