To set up examples for the Distributed Transaction stage,
create the IBM® Db2® tables that are used by the
sample jobs, import the sample jobs, and run a job to populate the
source queue with messages.
About this task
To set up the examples for the Distributed Transaction stage:
Procedure
- Issue the following commands to create the tables that
are used by the sample jobs:
CREATE TABLE "DEPARTMENT2" (
"DEPTNO" CHAR(3) NOT NULL ,
"DEPTNAME" CHAR(36) NOT NULL ,
"MGRNO" CHAR(6) ,
"ADMRDEPT" CHAR(3) NOT NULL ,
"LOCATION" CHAR(16) ) ;
CREATE TABLE "WITHCONSTRAINT" (
"NAME" CHAR(10) ,
"AGE" INTEGER ) ;
ALTER TABLE WITHCONSTRAINT ADD CONSTRAINT AGE_CONSTRAINT CHECK (AGE < 100);
CREATE TABLE DUMMY(COL1 INTEGER);
- Set up the following MQ queues for the sample job:
- SOURCEQ
- A source queue that provides input to the initial MQ Connector
stage. This queue is used by all sample jobs.
- WORKQ
- A work queue that holds the output messages from the MQ Connector
stage, so that the job can be restarted from an intermediate stage.
This queue is used by all sample jobs.
- REJECTQ
- A queue that holds the messages that are rejected by the Distributed
Transaction stage. This queue is used by the RejectedByJobLogic and
RejectTransaction sample jobs.
You can create MQ queues by running the MQSC command
line utility for managing queue managers, or by using MQ Explorer.
To run the MQSC command line utility, issue the following command:
runmqsc qmgrname
In this command,
qmgrname is the name
of the queue manager.
- Import the DTSJobs.dsx file that is
contained in the DTSamples.zip file. You can
find the DTSamples.zip file in the c:\IBM\InformationServer\Clients\Samples\Connectors directory.
The DTSJobs.dsx file includes a prerequisite
job called GenerateMessages.
- Run the GenerateMessages job to populate the source queue
with messages.