Use the CREATE SUBSCRIPTION SET command to create
an empty subscription set.
Syntax
>>-CREATE SUBSCRIPTION SET--SETNAME--setname-------------------->
>--APPLYQUAL--applyqual--+--------------------+----------------->
'-ACTIVATE--+-NO---+-'
+-YES--+
'-ONCE-'
>--+----------------+------------------------------------------->
'-SETTYPE--+-R-+-'
+-U-+
'-P-'
>--+--------------------------------------------------------+--->
'-TIMING--+-EVENT--eventname---------------------------+-'
+-INTERVAL--minutes--------------------------+
+-BOTH--EVENT--eventname - INTERVAL--minutes-+
'-CONTINUOUS---------------------------------'
>--+---------------------------------------------------+-------->
'-START DATE--"yyyy-mm-dd"--TIME--"hh:mm:ss.ffffff"-'
>--+--------------------------------+--+-----------------+-----><
'-NONIBM SOURCE SERVER--srvrname-' '-COMMIT COUNT--n-'
Parameters
- SETNAME setname
- Specifies the subscription-set name.
- APPLYQUAL applyqual
- Specifies the Apply qualifier for the subscription set.
- ACTIVATE
- Specifies whether to activate the subscription set.
- NO
- Specify to not activate the subscription set. This is the default.
- YES
- Specify to activate the subscription set.
- ONCE
- Specify to activate the subscription set for one Apply cycle, then deactivate
the subscription set.
- SETTYPE
- Specifies the subscription-set type.
- R
- Specifies a read-only set. This is the default.
- U
- Specifies an update-anywhere set.
- P
- Specifies a peer-to-peer set.
- TIMING
- Specifies the timing for the subscription set.
- EVENT eventname
- Specifies the event that when posted to the IBMSNAP_SUBS_EVENT table,
causes the Apply program to process the subscription set.
- INTERVAL minutes
- Specifies the interval for the Apply program to process the subscription
set. The default interval is 20 minutes.
- BOTH
- Specifies that this subscription set uses both event and interval timing.
- CONTINUOUS
- Specifies that the Apply program should process the subscription set continuously.
This keyword is equivalent to specifying an interval of zero minutes.
- START DATE "yyyy-mm-dd"
- Specifies the date to activate the subscription set. The double quotation
marks are required.
- TIME "hh:mm:ss.ffffff"
- Specifies the time to activate the subscription set. The double quotation
marks are required.
- NONIBM SOURCE SERVER srvrname
- Specifies the name of the non-DB2 source server.
- COMMIT COUNT n
- Specifies the number of transactions that the Apply program should process
before issuing a SQL COMMIT statement for the subscription set. The default
value is NULL, which means that the Apply program issues just one COMMIT statement
for the subscription set after it processes the entire set. Do not specify
the COMMIT COUNT option if you want the default behavior.
Usage notes
- This command can create only empty subscription sets, whereas the Replication
Center allows you to create empty subscription sets or add members to the
set while creating it.
- A Capture schema is required, even though the set is empty.
- Because the set is empty, the default for activating the set is NO.
- To add a member to an existing subscription set, use the CREATE
MEMBER command.
- To add a statement to the set, issue the CREATE SUBSCRIPTION
SET STMTS command.
Example 1
To create a subscription set SET00 that activates
on 2006-11-22 at 09:00:00.000000:
CREATE SUBSCRIPTION SET SETNAME SET00 APPLYQUAL AQ00 ACTIVATE YES TIMING INTERVAL 1
START DATE "2006-11-22" TIME "09:00:00.000000"
Example 2
To create a subscription set SET00 that activates
for one Apply cycle on 2006-11-22 at 09:00:00.000000:
CREATE SUBSCRIPTION SET SETNAME SET00 APPLYQUAL AQ00 ACTIVATE ONCE TIMING CONTINUOUS
START DATE "2006-11-22" TIME "09:00:00.000000" NONIBM SOURCE SERVER SAMPLE