CDC Presentation
CDC Presentation
Target
Target JDBC
Subscription
Subscription 22
Subscription
Subscription 22
Transaction
Transaction
Database queues
queues Change
Change log
log
logs (staging
(staging store)
store) Target
Target
Subscription
Subscription 33
Subscription
Subscription 33
Scraper
Log Reader Thread captures changes for all active tables across all subscriptions
Captured changes are stored in the Staging Store
The Staging store is backed by memory and disk. Where possible, data is stored and accessed in memory.
Maximum Staging Store size is set during CDC Instance Configuration
4/18/19
CDC Software Components
4/18/19
CDC Software Components
Instance:
• InfoSphere Change Data Capture services when initialized/configured against a specific database is called an instance.
• An instance can be treated either as a source or a target CDC agent w.r.t the database acts as either a source or a
target. So instances are sometimes called source/target agent server.
• A machine installed with InfoSphere Change Data Capture can have multiple instance running. (ex- edwps013/015.)
Data Store:
• An instance when mapped with database connection to schema containing the tables for replication.
4/18/19
CDC Software Components
SPR_REPL.CUSTOMER
SPR_REPL.CAMPAIGNORGANISATION
SOTXP02
DataStore
4/18/19
CDC Software Components
Access server:
• It manages user access, creation of datastore, connectivity to databases and map user with datastore using access
manager feature of management console.
• When the access server is installed it is configured with an user with system administrator role. For the first time login
to management console need this user login.
• The system administrator subsequently can create user with required roles.
4/18/19
CDC Software Components
Management Console:
Management Console is the end user client interface for InfoSphere Change Data Capture. Management Console has
three perspectives. Each perspective
2. Configuration perspectives:
• Add/Edit/Delete datastores
• Add/Edit/Delete subscriptions
• Add/Import/Export projects
• Mapping, customizing tables and configure replication
3. Monitoring perspective:
• Starting, ending and monitoring replication
• view events, statistics, and table mappings.
• View replication state, status of a subscription
• view notifications sent by subscriptions and datastores.
4/18/19
CDC Software Components
Replication Type: The process of maintaining a on-going synchronization that is sending changes from source tables to
target tables. Replication method mainly of two types
• Refresh: A process that will synchronize the target table with the current contents of the source table.
• Mirroring: The process of continuous replication of changed data from the source system to the target system
Apply Methods:
• Live Audit: - Live Audit data is inserted into the target table irrespective of source operation. The operations are
identified by Aud_Type (PT=Insert, UP=Update, RR=Delete).
• Adaptive Apply: – Update the record if already exist in the target table else insert a new record irrespective of source
operation. Adaptive Apply replication provides flexibility when source and target tables are not synchronized.
• Standard Apply: - In standard apply, the source operations that is a row insert/update/delete operation on the source
table would result in an insert/update/delete on the target table respectively. In this method the source and the target
tables need to be synch with each other.
4/18/19
CDC Software Components
Live Audit
Adaptive Apply
4/18/19
H3G CDC Hardware Architecture
4/18/19
Design Consideration:
2. Minimum Supplemental logging needs to be active in the Oracle source database to run in ARCHIVELOG mode.
ARCHIVELOG Mode: The Oracle redo log will contain required information to describe all data changes completely.
4. Target tables will have same schema definition and unique constrains as in the source table.
5. OS User Privileges: Dedicated OS User for running InfoSphere CDC and Read access to archive and online logs
4/18/19
Failure Management
1. When OTS database crashed and then recovered to previous state. If data mismatch found between OTS and Clone
then the data can be recover using following options..
2. In case of database crash/outage on the source system, CDC has to wait and may needs to increase the archive log
retention period (Wipro).
4/18/19
Maintenance and Operation Support
4/18/19
Maintenance and Operation Support
4/18/19
CDC Commands
A) To Stop Instance
./dmshutdown -I <INSTANCE NAME> # (dmterminate command can be used to force down any instance)
B) To Start Instance
nohup ./dmts64 -I <INSTANCE NAME> &
C) To Start Access Server
nohup dmaccessserver &
D) To Kill Access Server
kill -9 <process id> # obtain process id of Access Server using ps command
D) Remove all the contents from the Staging Store
./dmclearstagingstore -I <instance name>
E) To change the scraping point for a subscription
dmsetbookmark -I <INSTANCE_NAME> -s <SUBSCRIPTION_NAME ...> [-a]
[-a] is optional, if you use this option scraping point will be applied to all the subscriptions for a particular
instance.
F) To check the status of instances
./dmconfigurets
4/18/19
Automated Replication Control Using Batchman
4/18/19
Frequent CDC Issue and Fixes
Replication is slow and stuck at any log
Fix with DBA if database is down, performance is slow that delays the Archive log generation.
In case of high transaction wait for replication to complete (Festive season).
Replication is lagging for one node due to network issue, database issue etc.
Wait until the Replication Ends
DDL error: When there is a mismatch in the table structures between the source and target for a subscription CDC
throws a DDL error, take the following action to resolve this issue:
i. End replication of the erroneous instance from MC
ii. Update the ddl_restart.sh script with the corresponding table name for which the error is thrown
iii. Run the updated ddl_restart.sh script and check the log is successful or not.
iv. Start the subscription.
DDL error
When there is a mismatch in the table structures between the source and target for a subscription CDC throws a DDL error,
take the following action to resolve this issue:
1. End replication of the erroneous instance from MC
2. Update the ddl_restart.sh script with the corresponding table name for which the error is thrown
3. Run the updated ddl_restart.sh script and check the log is successful or not.
4. Start the subscription.
4/18/19
Thank You
4/18/19