Moving Q subscriptions to a different replication queue map
You can move existing Q subscriptions to a new replication queue map so that they use a different send queue and receive queue for data transmission.
About this task
Procedure
Procedure
- Optional:
If you are using a new replication queue map for the Q subscriptions, create it with the
Replication Center or ASNCLP command-line program, specifying the names of the send queue, receive
queue, and Q Apply administration queue.
You can also move the Q subscriptions to an existing queue map.
-
Stop the send queue that the Q subscriptions are currently using. You can use a signal to the Q
Capture program similar to the following example:
The command in this example prompts the Q Capture program to publish all changes up to the current timestamp for send queue OLDQ and wait for Q Apply to acknowledge that all changes from this queue are applied before stopping the send queue.INSERT INTO QASN1.IBMQREP_SIGNAL(SIGNAL_TIME,SIGNAL_TYPE,SIGNAL_SUBTYPE,SIGNAL_INPUT_IN,SIGNAL_STATE) VALUES (CURRENT TIMESTAMP,'CMD','STOPQ','OLDQ;CURRENT_TIMESTAMP;DATA_APPLIED','P');
-
At the Q Capture server, for each Q subscription that you are moving update the SENDQ column in
the IBMQREP_SUBS table with the name of the new send queue:
UPDATE QASN1.IBMQREP_SUBS SET SENDQ='new_queue_name' WHERE SUBNAME='qsub_name';
-
At the Q Apply server, for each Q subscription that you are moving update the RECVQ column in
the IBMQREP_TARGETS and IBMQREP_TRG_COLS tables with the name of the new receive queue:
UPDATE ASN.IBMQREP_TARGETS SET RECVQ='new_queue_name' WHERE SUBNAME='qsub_name'; UPDATE ASN.IBMQREP_TRG_COLS SET RECVQ='new_queue_name' WHERE SUBNAME='qsub_name';
-
Start the old and new send queues on the Q Capture side:
INSERT INTO QASN1.IBMQREP_SIGNAL(SIGNAL_TIME,SIGNAL_TYPE,SIGNAL_SUBTYPE,SIGNAL_INPUT_IN,SIGNAL_STATE) VALUES (CURRENT TIMESTAMP,'CMD','STARTQ','OLDQ','P'); INSERT INTO QASN1.IBMQREP_SIGNAL(SIGNAL_TIME,SIGNAL_TYPE,SIGNAL_SUBTYPE,SIGNAL_INPUT_IN,SIGNAL_STATE) VALUES (CURRENT TIMESTAMP,'CMD','STARTQ','NEWQ','P');
-
Start the new receive queue on the Q Apply side.
You can use the MODIFY command:
Or send an SQL command to Q Apply:F QAPPLY_JOBNAME,STARTQ=NEWQ
INSERT INTO ASN.IBMQREP_APPLYCMD (CMD_TEXT) VALUES ('STARTQ=NEWQ');