Creating auxiliary objects for a partitioned table space
Use the following procedures to create auxiliary objects for an existing base table in a partitioned table space.
The CAX action code is used to create the auxiliary table spaces, tables, and indexes that are required for a base table that contains a LOB column. In this task, name prefixing is used in a template to automatically and uniquely name the auxiliary objects.
In this task, you perform the following subtasks:
- Display the list of columns.
- Create the auxiliary table spaces.
- Create the auxiliary tables.
- Create the auxiliary indexes.
- Review the list of auxiliary objects.
- (Optional) Undo changes to the auxiliary objects.
Before you begin
If you want to increase the number of partitions in the partitioned table space, do so before you begin this task.
To display the list of columns
- 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.
- On the Mixed List panel, type CO in the Act column adjacent to the base table (TBB) that contains a LOB column.
- On the Table Columns List panel, type CAX in the Act column adjacent to the LOB column name and press Enter.
To create the auxiliary table spaces
On the Create Auxiliary Tablespace Template panel, select Use name prefixing.
Specify the attributes for the table spaces.
Specify a prefix for the name of the table spaces. You can retain the first byte (L) and replace the three question mark (?) characters, or replace all four of the characters. Underscores are not allowed.
- Specify the owner of the table space.
- Specify the attributes for the table spaces. If you need 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 Tablespace List panel is displayed. A unique four-digit suffix is appended to the table space name prefix for each table space.
If necessary, modify the names of the auxiliary table spaces. Then, press END.
The table spaces are saved in the CD tables.
To create the auxiliary tables
On the Create Auxiliary Table Template panel, specify the attributes for the tables.
- Specify the owner of the tables.
Specify a prefix for the name of the tables.
- Specify a label for the tables.
Specify whether the parent (auxiliary) table space already exists in the Db2 catalog.
To specify a comment for the tables, type S to select Table Comment.
- Press END.
(If necessary) On the Auxiliary Table List panel, modify the names of the auxiliary tables. Then, press END.
The tables are saved in the CD tables.
To create the auxiliary indexes
On the Create Auxiliary Index Template panel, specify the attributes for the indexes.
- Specify the owner of the indexes.
Specify a prefix for the name of the indexes.
- 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 indexes, type S to select Comment.
- Press END.
(if necessary) On the Auxiliary Index List panel, modify the names of the auxiliary indexes. Then, press END.
The indexes are 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 by the LOB column and partition, 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 1 to 11 of 12
More: +
Act Object-Type Objects Column Part
************************************ TOP **************************************
L TS . . . . . . CJACML01 L01PSL1A
L TB . . . . . RDACRJ T_L01PSL1A XCLOB 1
L IX . . . . RDACRJ I_L01PSL1A
L TS . . . . . . CJACML01 L01PSL1B
L TB . . . . . RDACRJ T_L01PSL1B XCLOB 2
L IX . . . . RDACRJ I_L01PSL1B
L TS . . . . . . CJACML01 L01PSL1C
L TB . . . . . RDACRJ T_L01PSL1C XCLOB 3
L IX . . . . RDACRJ I_L01PSL1C
L TS . . . . . . CJACML01 L01PSL1D
L TB . . . . . RDACRJ T_L01PSL1D XCLOB 4- Press END until 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.
- 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.