Starting a Q Capture program
You start a Q Capture program to begin capturing transactions or row-level changes from the DB2® recovery log for active or new Q subscriptions or publications, and sending the transactional data as messages over IBM® MQ queues.
Before you begin
- If you are starting a Q Capture program from a remote workstation, configure connections to the Q Capture server.
- Create an MQ queue manager, queues, and other required objects.
- Ensure that you have authorization for Q Replication and event publishing objects and MQ objects.
- Create control tables for the appropriate Q Capture schema.
- Configure the source database or subsystem to work with the Q
Capture program. Important: Ensure that archive logging is turned on at the database that you are using as the Q Capture server. Use the Turn On Archive Logging window in the Replication Center to configure the Q Capture server for archive logging, and perform an offline backup of the database.
- If any Q subscriptions that specify an automatic load that uses the EXPORT utility are in N (new) or A (active) state, create a password file on the Q Apply server to allow the utility to connect to the Q Capture server.
About this task
When you initially start a Q Capture program without specifying a start mode, it uses the default start mode, warmsi. In this mode, the program tries to read the log at the point where it left off. Because this is the first time that the program is started, Q Capture switches to cold start mode and begins processing Q subscriptions or publications that are in N (new) or A (active) state. Any Q subscriptions or publications that are in I (inactive) state must be activated for the program to begin capturing changes.
You can start a Q Capture program even if no Q subscriptions or publications are in A (active) state. When you activate the Q subscriptions or publications, the Q Capture program begins capturing changes.
When you start a Q Capture program, you can specify startup parameter values and the program will use the new values until you take one of the following actions:
- Change the parameter values while the program is running.
- Stop and restart the program, which prompts it to read the IBMQREP_CAPPARMS table and use the values saved there.
Procedure
Method | Description |
---|---|
z/OS® console or TSO | On z/OS, you can start a Q Capture
program by using JCL or as a system-started task. You can specify
new invocation parameter values when you start a Q Capture program
with JCL. z/OS has a 100-byte limit for the total length of parameters that you can specify in the PARMS= field. To overcome this limitation, replication programs now allow you to specify as many additional parameters as needed in the SYSIN data set. When the SYSIN DD statement is included in the invocation JCL, the Q Capture program automatically concatenates what is specified in the SYSIN dataset to the PARMS= parameters. You can only specify Q Capture parameters in the SYSIN data set. Any LE parameters must be specified in the PARMS= field or in LE _CEE_ENVFILE=DD, followed by a slash(/). Example:
|
asnqcap command | Use the asnqcap command to start a Q Capture
program and specify startup parameters. For example:
Where server_name is
the name of the database or subsystem that contains the Q Capture
control tables, schema identifies the Q Capture
program that you want to start, and parameters is
one or more parameters that you can specify at startup. |
Windows services | You can create a replication service on Windows operating systems to start the Q Capture program automatically when the system is started. |
- Examine the Q Capture diagnostic log file (capture_server.capture_schema.QCAP.log on z/OS and db2instance.capture_server.capture_schema.QCAP.log on Linux, UNIX, and Windows) for a message that indicates that the program is capturing changes.
- Check the IBMQREP_CAPTRACE table for a message that indicates that the program is capturing changes.
- z/OS: If you are running in batch mode, examine the z/OS console or z/OS job log for messages that indicate that the program started.
- Use the Q Capture Messages window in the Replication Center to see a message that indicates that the program started. To open the window, right-click the Q Capture server that contains the Q Capture program whose messages you want to view and select .