Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

DB2 data replication troubleshooting help

To all,

We have been using DB2 7.1 (on Win2K Server) as our database solution now
for a few months. I was wondering if anybody has any experience in replicating
tables in a database.

I am able to replicate the table to a target server but then the data is
never synchronized with the source data. The table structure is perfect
but the data is never synchronized or replicated to the target.

Also, I was curious if they was a simpler way to replicate databases rather
than doing it table-by-table. Is there a batch command or third-party tool?

If anyone has any ideas, please feel free to pass them along. Any help is
very appreciated.

Brandon
[716 byte] By [Brandon] at [2007-11-9 18:51:22]
# 1 Re: DB2 data replication troubleshooting help
Hi Brandon,

> DB2 V7.1 on Win2k ...
> I am able to replicate the table to a target server but then the data is
> never synchronized with the source data. The table structure is perfect
> but the data is never synchronized or replicated to the target. Also, the
> capture
> program from the CLP never returns to the command prompt

You can set up full-refresh replication, which effectively copies the whole
table(s) each time. That doesn't use Capture, just Apply.
Other replication scenarios use Capture to collect changes into a "Change
Data" table for each source table, then Apply reads the changes and applies
them.

Capture normally doesn't return, it keeps running to keep collecting changes,
unless you use the AUTOSTOP keyword when you run Capture.

When you run Apply, you can specify TRCFLOW (trace flow) to watch what is
happening on the screen. You can redirect the trace to a file with TRCFILE.

There is a replication analyzer you can download from IBM now, that generates
a (large) HTML file describing your replication, what has run or is failing,
and what looks odd in the way it's set up. I recommend you get this tool, and
also read a lot of the Replication Guide and Reference in the online help. It
takes a bit to get through, but stick with it...

>
> Also, I was curious if they was a simpler way to replicate databases
> rather than doing it table-by-table. Is there a batch command or third-
> party tool?

Yes, there are 3rd party tools, and you could do it with scripts that export
and import, but you will always have to nominate the tables to replicate. If
you really want the whole database without picking tables, you could use
backup and restore. It depends what you want to achieve. DB2's Replication
is is pretty capable, but with any replication there's a learning curve.

--Greg
Greg Nash at 2007-11-12 0:03:30 >