(888) 685-3101 ext. 2

I’m posting some useful DB2 SQL replication troubleshooting utilities and how to use them.  These will work with any version 9 replication environment.

ASNANALYZE

Use the asnanalyze command to generate reports about the state of the replication control tables.

asnanalyze -db capturedb applydb > asnanalyze.htm

If the capture and apply db are the same, only one entry is needed.  View the report by opening it with a browser.

Information center link to the asnanalyze utility.  http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.swg.im.iis.db.repl.sqlrepl.doc/topics/iiyrsanzcommand.html

TRACE

You can set up a Trace when starting Apply with the ASNAPPLY command.  The command below will run Apply one time and output details to a file called trc.out

asnapply CONTROL_SERVER=<CTRLSRVR> APPLY_QUAL=<APQ1> APPLY_PATH=d:ASN  trcflow copyonce >d:asntrc.out

Information center link to the ASNAPPLY command: http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/index.jsp?topic=/com.ibm.swg.im.iis.db.repl.sqlrepl.doc/topics/iiyrssubasnapply.html

Capture and Apply Log file maintenance

The logs generated by Capture and Apply will need to be managed.   Using the LOGREUSE=Y option when starting Apply will delete the old log and start a new one.  If you have limited storage space, the recommendation is to follow this process when Apply needs to be stopped.

Stop apply.

Save the APP log to a different folder or rename it.

Start apply with the LOGREUSE=Y option.

The same option is available when starting Capture.   Follow the process when stopping and starting capture and use the LOGREUSE=Y option.

Share This