IBM Books

Replication Guide and Reference


Troubleshooting

This section describes various problems that can occur when running the Capture and Apply programs and how to diagnose the cause of these problems. You should also use the Replication Analyzer to determine general and specific problems with the replication environment and see Problem determination facilities.

Problem: The Capture for OS/390 program does not start.

Ensure that APF authorization was performed for all STEPLIB libraries as specified in the RUN JCL.

Problem: Capture for VM or Capture for VSE does not start.

Ensure that:

Problem: The Capture program is not capturing updates.

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

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

The first time that 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 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 CD tables. They are eventually applied to target tables and pruned from the CD tables. After the Capture program runs for some time, you should see rows in the CD tables if changes are made to the sources. Periodically, check the 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 Apply trail table.

Problem: Capture for OS/390 issued message ASN0000E instead of the proper message number.

Message ASN0000E is a generic message that is issued instead of a proper message if the specified VSAM message file in the RUN JCL was not found. See the Capture for OS/390 program directory for information on installing the VSAM message file.

Problem: Capture for VM or Capture for VSE issued message ASN0000E instead of the proper message number.

Message ASN0000E is a generic message that is issued instead of a proper message if either the default message file, ASNLS001 MSG, or the specified message file in the Capture startup JCL was not found. See the Capture for VM or Capture for VSE program directory for information on installing the message file.

Problem: The Capture program terminates.

The Capture 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.

Problem: Updates to the OS/390 source table are not being replicated to the target table.

DB2 for OS/390 writes log information to the active log in multiples of 4 KB VSAM control intervals (CI). For the Capture program to obtain these log records, there must be at least one CI written to the log. If your application has source table updates less than 4 KB in a quiet DB2 (no other log updates), you do not see the update results in the CD table until the 4 KB limit is reached. To see your updates you can use -ARCHIVE LOG to flush out updates immediately.

Problem: Capture for OS/390 failed while using the LE/370 environment.

The Capture program can run in both C/370 and LE/370 environments. If running in the LE/370 environment, you must specify REGION=10M in the RUN step.

Problem: Error message 0509 was issued.

Error message 0509 occurs because multiple versions of DB2, or DB2 and DataJoiner, are installed on the same system:

Ensure that the LIBPATH environment variable is set to the same environment in which the Apply program starts.

Problem: Apply component for DB2 Universal Database stops with an SQLCODE= -330, SQLSTATE=22517, "A string cannot be used, because its characters cannot be translated".

When copying between DB2 for OS/390 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 copy server into the pruning control table on a DB2 for OS/390 source server.

For example, if you use the Korean character set with mixed data at both a DB2 for OS/390 source server and a DB2 Universal Database target server, the INSERT fails because the original string is in mixed-data ASCII. When it is translated to EBCDIC 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.

If you are running in a mixed environment, ensure that you have installed the latest maintenance for the CCSID support of your DB2 for OS/390 program.

For more information on character translation, see the character conversion appendix in the DB2 for OS/390 Version 6: Installation Guide.

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

Error code 1067 occurs under the following circumstances:

Problem: The ASNSERV.LOG file in ASNPATH tells me that 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 the Apply trace file:

<ASNPATH pathname>APPLY<timestamp>.TRC

Problem: I 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 program packages, and make sure to bind both the Apply program packages to the control, source, and target server databases.

Problem: The DB2 log 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 routine, or you can perform your own load, as described in Loading target tables offline using DJRA.

If the error occurred while applying changed data, then you can change the data-blocking parameter to break down large blocks of changed data. See Specifying a data-blocking value.

Problem: Capture 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 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 the register table at the source server for the source table. In this case, the Apply program issues message ASN1016E and does nothing.

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 subscription set table to null.

Problem: I unsuccessfully tried to start a second Apply program instance.

You must run each instance with a unique Apply qualifier.

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

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

Apply for AS/400 does not use a password file, so it attempts to connect to the database using the user ID specified in the user parameter of the STRDPRAPY CL command. Ensure that you correctly set up your DRDA connectivity definitions.

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

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


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

[ DB2 List of Books | Search the DB2 Books ]