IBM Books

DB2 Replication Guide and Reference


Operating Apply for AIX, Apply for HP-UX, Apply for Solaris, and Apply for UnixWare 7

An administrator can use the commands in the following sections to perform the following Apply tasks:

Before You Start the Apply Program

Before you start the Apply program, ensure that:

Starting Apply for AIX, Apply for HP-UX, Apply for Solaris, and Apply for UnixWare 7

After you start the Apply program, it runs continuously until:

To start Apply for AIX, Apply for HP-UX, Apply for Solaris, and Apply for UnixWare 7:

  1. Ensure that you set the DB2 instance name as shown:
    export DB2INSTANCE=db2_instance_name
    

  2. Set the LIBPATH environment variable in the same environment in which the Apply program starts. For example, you can set LIBPATH with the following statement:
    export LIBPATH=~/sqllib/lib:/usr/lib:/lib
    

  3. From AIX, HP-UX, Solaris, or UnixWare 7, log on with the IBM Replication user ID. Make sure that the user ID under which Apply is running has write privilege on the directory.

  4. Enter the asnapply command and one or more options, if desired. The syntax is:
>>-asnapply--apl_qual----+-----------+---+-----------+---------->
                         '-ctrl_serv-'   +-loadxit---+
                                         '-noloadxit-'
 
>-----+----------+---+---------+---+----------+---+---------+--->
      +-inamsg---+   +-notrc---+   +-notify---+   +-sleep---+
      '-noinamsg-'   +-trcerr--+   '-nonotify-'   '-nosleep-'
                     '-trcflow-'
 
>-----+----------+---------------------------------------------><
      +-delay(n)-+
      '-delay(6)-'
 

Table 16 defines the optional positional parameters.


Table 16. ASNAPPLY Parameter Definitions for UNIX Platforms

Parameter
Definition

apl_qual
Specifies the Apply program qualifier the Apply program instance uses to identify the subscriptions to be served. The Apply qualifier is case sensitive and must match the value of APPLY_QUAL in the subscription set table. This is a positional parameter that is required as the first parameter.

ctrl_serv
Specifies the name of the server where the replication control tables will reside. If you do not specify this optional positional parameter, the default is the default database or the value in DB2DBDFT.

loadxit
Specifies that the Apply program is to invoke ASNLOAD, an exit program that can call an IBM or multivendor utility, to initialize a target table. This keyword parameter is optional.

noloadxit  (default) 
Specifies that the Apply program will not invoke ASNLOAD.

inamsg  (default) 
Specifies that the Apply program is to issue a message when the Apply program is inactive.

noinamsg
Specifies that the Apply program will not issue this message. This keyword parameter is optional.

notrc  (default) 
Specifies that the Apply program does not generate a trace.

trcerr
Specifies that the Apply program generates a trace that contains only error information. This keyword parameter is optional.

trcflow
Specifies that the Apply program generates a trace that contains error and execution flow information. This keyword parameter is optional.

notify
Specifies that the Apply program is to invoke ASNDONE, an exit program that returns control to the user when the Apply program processing ends. This keyword parameter is optional.

nonotify  (default) 
Specifies that the Apply program will not invoke ASNDONE.

sleep  (default) 
Specifies that the Apply program is to go to sleep if no new subscriptions are eligible for processing.

nosleep
Specifies that the Apply program is to stop if no new subscriptions are eligible for processing. This keyword parameter is optional.

delay(n)
Where n=0, 1, 2, 3, 4, 5, or 6. Specifies the delay time (in seconds) at the end of each Apply program cycle when continuous replication is used. This keyword parameter is optional.

delay(6)  (default) 
Specifies a delay time of 6 seconds at the end of each Apply program cycle when continuous replication is used.

When Apply for AIX, Apply for HP-UX, Apply for Solaris, or Apply for UnixWare 7 executes, it generates two files:

Scheduling Apply for AIX, Apply for HP-UX, Apply for Solaris, and Apply for UnixWare 7

Use the at command to start Apply at a specific time. For example, the following command starts Apply at 3:00 p.m. on Friday:

at 3pm Friday asnapply l 1 r

Stopping Apply for AIX, Apply for HP-UX, Apply for Solaris, and Apply for UnixWare 7

Use the following command to stop Apply for AIX, Apply for HP-UX, Apply for Solaris, and Apply for UnixWare 7:

>>-asnastop--apply_qualifier-----------------------------------><
 

or

>>-kill---INT--pid---------------------------------------------><
 

You can alternatively use one of the following key combinations from the window where the Apply program is running:

Purpose

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

Usage

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

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

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

  3. Enter the command.

To use one of the key combinations, press it from the same NT window in which the Apply program is running.


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

[ DB2 List of Books | Search the DB2 Books ]