IBM Books

DB2 Replication Guide and Reference


Troubleshooting

The following sections describe commonly known issues with Capture and Apply for Windows NT and Windows 95 programs.

Problems Using the Capture Program

Problem

The Capture for Windows NT program is not capturing updates.

Any of the following could prevent the Capture program from capturing updates:

Problem

I'm not sure if the Capture program is running successfully.

The first time you start the Capture and Apply programs, the Apply program performs a full refresh to populate the target tables. Then the Capture program writes message ASN0104I to the ASN.IBMSNAP_TRACE table, providing information related to table owner name, table name, and starting log sequence number value. This provides a point from which the Capture program starts to capture updates.

Updates captured from then on are placed in change data tables. They are eventually applied to target tables and pruned from the change data tables. After the Capture program runs for some time, you should see rows in the change data tables if changes are made to the sources. Periodically, check the ASN.IBMSNAP_TRACE table to see the progress made by the Capture program. If it encounters errors, it sends them to the console and also logs them in the trace table. Similarly, the Apply program logs its information in the ASN.IBMSNAP_APPLYTRAIL table.

Problem

Capture for Windows NT terminates.

The Capture for Windows NT program terminates either because of a severe error, or when you issue the STOP command. The Capture program terminates with a return code that indicates successful or unsuccessful completion. Return codes are:

0
STOP command issued

8
Error during initialization

12
Any other severe error

See Capture Program Messages for an explanation of this message.

Problems Using the Apply Program

Before running the Apply program, ensure that:

When an error occurs while running the Apply program, the status field in ASN.IBMSNAP_SUBS_SET is set to -1 for that copy definition.

Errors as well as successful executions are logged in the ASN.IBMSNAP_APPLYTRAIL table. APPERRM contains the message text. Any SQL errors are also logged in this table. Error messages are also issued on the console.

Specific Apply program problems are described below.

Problem

I have performed a successful bind, but when running the Apply program, I still get SQLCODE -805, SQLSTATE 51002.

Make sure that the user ID has execute privilege on the Apply packages, and make sure to bind both the Apply program packages to the control, source, and target server databases.

Problem

The DB2 log has filled to capacity because I copied a very large table.

If the error occurred during a full refresh, you can use alternative methods to load large tables. You can either use the ASNLOAD exit, described in Table 12, or you can perform your own load, described in Loading the Tables within a Subscription Set.

If the error occurred while applying changed data, you can change the data blocking parameter to break down large blocks of changed data. See Specifying Mini-Cycles for the Apply Program to Copy Committed Data.

Problem

The Capture program was cold started, which caused the Apply program to perform a full refresh, but I don't want a full refresh.

If your target table is very large, and in cases where you have decided to use only your own load mechanism, you might want to suppress any future full refreshes of the Apply program. Set the DISABLE_REFRESH flag to 1 in ASN.IBMSNAP_REGISTER at the source server for the source table. In this case, the Apply program issues message ASN1016E.

Problem

I received system error 1067 trying to start the Capture or Apply as NT Service.

Error code 1067 occurs under the following circumstances:

Problem

The ASNSERV.LOG file in ASNPATH tells me the Apply program was started correctly, but the Apply process terminated.

To find out why the Apply program terminated, change the syntax of NTSERV.ASN to:

...ASNAPPLY USERQUAL TRCFLOW

The trace output will be written to Apply trace file:

<ASNPATH pathname>APPLY<timestamp>.TRC 

Problem

A gap was detected, so the Apply program won't perform a full refresh of my target table.

Force a full refresh by resetting the LASTSUCCESS, SYNCHTIME, and SYNCHPOINT values in ASN.IBMSNAP_SUBS_SET to null.

Problem

I unsuccessfully tried to start a second Apply program instance.

You must run each instance with a unique Apply program qualifier.

Problem

I received error ASN1003 with SQLCODE = -1032 and SQLSTATE = 57019.

You must start the database manager before invoking the Apply program.

Problem

The Apply components for DB2 Universal Database stop with an SQLCODE= -330, SQLSTATE=22517, "A string cannot be used, because its characters cannot be translated".

When copying between DB2 for MVS and DB2 Universal Database, the CCSID translation can cause an INSERT to fail if a translated value is longer than the DB2 column in which it will be inserted. The Apply program can generate an SQLCODE -330 when it tries to insert a translated COPY_TABLE column value from the refresh control table on a DB2 Universal Database target server into the pruning control table on a DB2 for MVS source server.

For example, if you use the Korean character set with mixed data at both DB2 for MVS source server and DB2 Universal Database target server, the INSERT fails because the original string is in mixed data ASCII. When it is translated to EBCIDIC mixed data with the Korean character set, if the resulting string length is greater than 18 characters (the maximum COPY_TABLE length), the INSERT fails with an SQLCODE of -330.
Important:If you are running in a mixed environment, ensure you have installed the latest maintenance for the CCSID support of your DB2 for MVS program.

For more information on character translation, see the Character Conversion for Distributed Data chapter in DB2 Version 4 Administration Guide, Volumes 1,2.

Problem

I received a security violation message, and the Apply program is not authorized to connect to the database.

The control server name, userid, and password definitions must match exactly those specified in the password file, and are case sensitive. Check your definitions again.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]