IBM Books

Replication Guide and Reference


Operating Capture for OS/2

The IBM Replication administrator user ID can use the commands in this section to operate Capture for OS/2. Enter the commands or key combinations from an OS/2 window.

This section explains how to perform the following Capture for OS/2 tasks:

Before You Start the Capture Program

Before starting the Capture program, make sure you complete the following post-installation tasks:

Starting Capture for OS/2

After you start the Capture program, it runs continuously until you stop it or it detects an error.

To start the Capture program:

  1. If you created one or more DB2 for OS/2 instances, use the SET command to set the DB2INSTANCE environment variable to the DB2 for OS/2 instance with which you plan to run the Capture program:
    SET DB2INSTANCE=database_instance_name
    

    While the Capture program is running, a file with the name database_name.CCP is created in the directory from which the Capture program is invoked. This file is a log file for the messages issued by the Capture program; these messages are also recorded in the ASN.IBMSNAP_TRACE table.

  2. Enter the ASNCCP command from the OS/2 window where you issued the SET command. The syntax is:
>>-ASNCCP--+------------+-+--------+-+---------+-+---------+---><
           +-Src_server-+ +-WARM---+ +-PRUNE---+ +-NOTRACE-+
                          +-WARMNS-+ +-NOPRUNE-+ +-TRACE---+
                          +-COLD---+
 

Table 13 defines the optional parameters.

Table 13. ASNCCP Command Parameter Definitions for OS/2

Parameter
Definition

Src_server
Source server name positional parameter that must be the first parameter if entered. If not specified, the value from the DB2DBDFT environment variable will be used.

WARM  (default) 
The Capture program resumes processing where it ended in its previous run if warm start information is available. If the Capture program cannot warm start, it switches to a cold start. See "Warm and Cold Starts" for more information.

WARMNS
The Capture program resumes processing where it ended in its previous run if warm start information is available. Otherwise, it issues a message and terminates. With WARMNS, the Capture program does not automatically switch to a cold start. The Capture program leaves the trace, UOW, change data, and warm start tables intact. In case of errors, the Capture program terminates instead of switching to a cold start as when WARM is specified. See "Warm and Cold Starts" for more information.

COLD
The Capture program starts by deleting all rows in its change data table, UOW table, pruning control table, and trace table during initialization. Refer to "Warm and Cold Starts" for more information.

PRUNE  (default) 
The Capture program automatically prunes the change data and UOW tables.

NOPRUNE
Automatic pruning is disabled. The Capture program prunes the change data and UOW tables when you enter the PRUNE command. See the PRUNE command for more information.

NOTRACE  (default) 
No trace information is written.

TRACE
Writes debug trace messages to the standard output, stdout.

Scheduling Capture for OS/2

Use the Alarms program in the OS/2 Productivity set to start Capture for OS/2 at a specific time.

Stopping Capture for OS/2

>>-ASNCMD--STOP------------------------------------------------><
 

or one of the following:

Purpose

Use the STOP command or the key combination to stop the Capture program in an orderly way and commit the log records that it processed up to that point.

Stop the Capture program before:

Usage

Suspending Capture for OS/2

>>-ASNCMD--SUSPEND---------------------------------------------><
 

Purpose

Use the SUSPEND command to relinquish OS/2 resources to operational transactions during peak periods without damaging the Capture program environment.

This command suspends the Capture program until you issue the RESUME command.

Usage

To use the command, do the following from a different window than where the Capture program is running:

  1. Set environment variable DB2INSTANCE to the value that was set when the Capture program was started.

  2. Set environment variable DB2DBDFT to the source server specified when the Capture program was started (or the DB2DBDFT value that was used when the Capture program was started).

  3. Enter the command.

Attention: Do not use SUSPEND when canceling a replication source. Instead, stop the Capture program using Ctrl+C.

Resuming Capture for OS/2

>>-ASNCMD--RESUME----------------------------------------------><
 

Purpose

Use the RESUME command to restart the Capture program if you suspended it using the SUSPEND command.

Usage

To use the command, do the following from a different window than where the Capture program is running:

  1. Set environment variable DB2INSTANCE to the value that was set when the Capture program was started.

  2. Set environment variable DB2DBDFT to the source server specified when the Capture program was started (or the DB2DBDFT value that was used when the Capture program was started).

  3. Enter the command.

Reinitializing Capture for OS/2

>>-ASNCMD--REINIT----------------------------------------------><
 

Purpose

Use the REINIT command to make the Capture program reread the ASN.IBMSNAP_REGISTER table or the ASN.IBMSNAP_CCPPARMS table while it is running. Use this command when you add a new replication source with Control Center while the Capture program is running.

This command ensures that the Capture program recognizes the new replication source. The Capture program also rereads the ASN.IBMSNAP_CCPPARMS table for any changes made to the tuning parameters.

Attention:

Do not use REINIT to reinitialize the Capture program after canceling a replication source or dropping a replication source table while the Capture program is running. Instead, stop the Capture program and restart it using the WARM option.

Usage

To use the command, do the following from a different window than where the Capture program is running:

  1. Set environment variable DB2INSTANCE to the value that was set when the Capture program was started.

  2. Set environment variable DB2DBDFT to the source server specified when the Capture program was started (or the DB2DBDFT value that was used when the Capture program was started).

  3. Enter the command.

Pruning the Change Data and Unit-of-Work Tables

>>-ASNCMD--PRUNE-----------------------------------------------><
 

Purpose

Use the PRUNE command to prune the CD and UOW tables if you used the NOPRUNE invocation parameter to disable pruning when you started the Capture program. This command prunes the CD and UOW tables once. The Capture program issues the message ASN0124I when the command is successfully queued.

Usage

To use the command, do the following from a different window than where the Capture program is running:

  1. Set environment variable DB2INSTANCE to the value that was set when the Capture program was started.

  2. Set environment variable DB2DBDFT to the source server specified when the Capture program was started (or the DB2DBDFT value that was used when the Capture program was started).

  3. Enter the command.

During pruning, if you stop or suspend the Capture program, pruning does not resume after you enter the RESUME command. You must enter the PRUNE command again to resume pruning.

Providing the Current Log Sequence Number

>>-ASNCMD--GETLSEQ---------------------------------------------><
 

Purpose

Use the GETLSEQ command to provide the current log sequence number and the timestamp. You can use this number to determine how far the Capture program has read the DB2 log.

Usage

To use the command, do the following from a different window than where the Capture program is running:

  1. Set environment variable DB2INSTANCE to the value that was set when the Capture program was started.

  2. Set environment variable DB2DBDFT to the source server specified when the Capture program was started (or the DB2DBDFT value that was used when the Capture program was started).

  3. Enter the command.


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

[ DB2 List of Books | Search the DB2 Books ]