An administrator can use the commands in the following sections to perform the following Apply program tasks:
Before you start the Apply program, ensure that:
After you start the Apply program, it runs continuously until:
To start the Apply program using the NT services:
You can also start the replication service by typing STRTSERV on the Windows NT command line.
To start the Apply program using the DB2 command window:
Perform the following steps from a Windows or OS/2 window:
SET DB2INSTANCE=db2_instance_name
>>-ASNAPPLY--Apl_qual----+-----------+---+-----------+----------> '-Ctrl_serv-' +-LOADXit---+ '-NOLOADXit-' >-----+----------+---+---------+---+---------+---+----------+---> +-INAMsg---+ +-NOTRC---+ '-TRCFILE-' +-NOTIFY---+ '-NOINAMsg-' +-TRCERR--+ '-NONOTIFY-' '-TRCFLOW-' >-----+---------+---+----------+---+----------+---+----------+--> +-SLEEP---+ '-DELAY(n)-' '-COPYONCE-' '-LOGREUSE-' '-NOSLEEP-' >-----+-----------+---+----------+----------------------------->< '-LOGSTDOUT-' '-TRLREUSE-'
Table 30 defines the invocation parameters.
Table 30. ASNAPPLY Invocation Parameter Definitions on Windows and OS/2
Parameter | Definition |
---|---|
Apl_qual | Specifies the Apply qualifier that the Apply program instance uses to identify the subscriptions to be served. The Apply qualifier is case sensitive and must match the value of the APPLY_QUAL in the subscription set table. This must be the first parameter. |
Ctrl_serv | Specifies the name of the server where the replication control tables will reside. If you do not specify this parameter, the default is the default database or the value of DB2DBDFT. |
LOADXit | Specifies that the Apply program is to invoke ASNLOAD, an IBM-supplied exit routine that uses the export and load utilities to refresh target tables. |
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. |
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. |
TRCFLOW | Specifies that the Apply program generates a trace that contains both error and execution flow information. |
TRCFILE | If both trcfile and trace are specified, the Apply program writes trace output to the trace file (*.trc). If you do not specify this option, the Apply program sends trace output to the standard output, stdout. |
NOTIFY | Specifies that the Apply program is to invoke ASNDONE, an exit routine that returns control to the user when the Apply program processing ends. |
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. |
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. The default delay time is 6 seconds. |
COPYONCE | The Apply program executes one copy cycle for each eligible subscription
set and then terminates. An eligible subscription set is such
that:
|
LOGREUSE | The Apply program reuses the log file (*.app) by first deleting it and then re-creating it when the Apply program is restarted. If you do not specify this option, the Apply program appends messages to the log file, even after the Apply program is restarted. |
LOGSTDOUT | The Apply program sends all messages to both the standard output (stdout) and the log file. |
TRLREUSE | The Apply program empties the Apply trail table when the Apply program is started. |
For Windows: Use the Windows AT command to start the Apply program at a specific time. For example, the following command string starts the Apply program for Windows at 15:00.
c:\>AT 15:00 /interactive "c:\SQLLIB\BIN\db2cmd.exe c:\SQLLIB\BIN\asnapply.exe qualid1 cntldb"
Before you enter the AT command, the Windows Schedule Service should already be started.
For OS/2: Use the Alarms program in the OS/2 Productivity set to start the Apply program at a specific time.
Use the ASNASTOP command or a key combination to stop the Apply program in an orderly way.
>>-ASNASTOP--Apply_qualifier-----------------------------------><
To use the command, do the following from a window where the Apply program is not running: