Creating auxiliary objects for a single partition in a partitioned table space
Use the following procedure to create a set of auxiliary objects for a single partition in a partitioned table space. The CAX action code is used to create the auxiliary table space, table, and index that are required for an existing base table that contains a LOB column.
In this task, you perform the following subtasks:
- Specify a template.
- Create the auxiliary table space.
- Create the auxiliary table.
- Create the auxiliary index.
- Review the list of auxiliary objects.
- (Optional) Undo changes to the auxiliary objects.
To specify a template
- On the BMC AMI Change Manager for Db2 Main Menu, select WORKID, and press Enter.
- On the WORKID Action Menu, type the name of the WORKID or type a wildcard pattern to display a list of work IDs. Then, select Specify DB2 definitions and press Enter.
- On the Object Specification panel, specify the name of a partitioned table space (or use wildcard characters). Then, press Enter.The Mixed List panel is displayed.
- Type CO in the Act column adjacent to the base table (TBB) that contains a LOB column.The Table Columns List panel is displayed.
- Type CAX in the Act column adjacent to the LOB column name and press Enter.The Create Auxiliary Tablespace Template panel is displayed.
To create the auxiliary table space
- On the Create Auxiliary Tablespace Template panel, select Create single object.
Specify the attributes for the table space.
- Specify the name of the table space.
- Specify the owner of the table space.
- Specify the attributes for the table space. To specify additional attributes, type S to select More Tablespace Attributes.
- Specify whether the parent database already exists in the Db2 catalog.
- Press END.The auxiliary table space is saved in the CD tables. The Create Auxiliary Table panel is displayed.
To create the auxiliary table
On the Create Auxiliary Table panel, specify the attributes for the table.
- Specify the owner of the table.
- Specify the name of the table.
- Specify the name of the table space.
- Specify a label for the table.
Specify whether the parent (auxiliary) table space already exists in the Db2 catalog.
- Specify the partition number for which you want to create the auxiliary table.
To specify a comment for the table, type S to select Table Comment.
- Press END.The auxiliary table is saved in the CD tables.
To create the auxiliary index
On the Create Auxiliary Index panel, specify the attributes for the index.
- Specify the owner of the index.
- Specify the name of the index.
- Specify the owner of the table.
- Specify the name of the table.
- Specify values for the attributes. To specify additional attributes, type S to select More Attributes.
Specify whether the parent (auxiliary) table already exists in the Db2 catalog.
- To specify a comment for the index, type S to select Comment.
- Press END.The auxiliary index is saved in the CD tables.
To review the list of auxiliary objects
On the Table Columns List panel, type AX in the Act column adjacent to the LOB column name to review the list of auxiliary objects for the base table.The Auxiliary Objects List panel is displayed. The auxiliary table space, table, and index for each partition are listed for the partition that you specified, as shown in the following figure.
ALUSAXL ER --------------------- Auxiliary Objects List ---------------------
Command ===> Scroll. . CSR
WORKID . . . . . RDACRJ.LOBTEST Commands: CANCEL
Base Table . . . RDACRJ.T_L01PS
Type action next to object and press Enter.
E=Edit L=Like D=Drop U=Undo
Objects 7 to 12 of 12
More: -
Act Object-Type Objects Column Part
TS . . . . . . CJACML01 L01PSL1C
TB . . . . . RDACRJ T_L01PSL1C XCLOB 3
IX . . . . RDACRJ I_L01PSL1C
L TS . . . . . . CJACML01 LATSP
L TB . . . . . RDACRJ LATP XCLOB 4
L IX . . . . RDACRJ LIXP
*********************************** BOTTOM ************************************- Press END.The Mixed List panel is displayed. The *@ marker adjacent to the base table (TBB) object indicates that auxiliary objects were created or modified for the base table.
- On the Mixed List panel, press END until the WORKID Action Menu is displayed.
To undo changes to auxiliary objects
If you wanted to undo the changes to the base table, you must undo the changes to the auxiliary objects.
- In the Mixed List panel, type AX in the Act column adjacent to the modified base table (TBB).
In the Auxiliary Objects List panel, remove the requested changes to the auxiliary objects. Perform one of the following tasks:
- To undo changes to all of the objects listed, type UNDOALL on the Command line.
- To undo changes to one or more of the objects listed, type U in the Act column adjacent to the auxiliary objects.
Now that the auxiliary objects have been created, you can analyze a work ID and execute a worklist.