Creating a history table from an existing history table


  1. On the BMC AMI Change Manager for Db2 Main Menu, select WORKID, and press Enter.
  2. 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.
  3. On the Object Specification panel, specify the name of a database and table space (or use wildcard characters). Then, press Enter.
  4. On the Mixed List panel, type L in the Act column adjacent to the table space (TS) that contains an existing history table.For example, as shown in the following figure, you would type L adjacent to the DEMO124B.TS2 table space.

    Act     Object-Type    Objects
            DB . . . . . . DEM0124B
              TS . . . . .   DEM0124B   TS1
               #TBH. . . .     DEM0124B   HIST_POLICY_INFO
                TB . . . .     DEM0124B   POLICY_INFO
    L         TS . . . . .   DEM0124B   TS2
               #TBH. . . .     DEM0124B   HIST_POLICY_INFO
  5. On the Create Tablespace panel, specify the information about the table space.
    1. Specify a new name for the table space.
    2. Press END.
  6. On the Mixed List panel, type L in the Act column adjacent to the existing history table (#TBH).For example, as shown in the following figure, you would type L adjacent to the DEMO124B.HIST_POLICY_INFO table.

    Act     Object-Type    Objects
            DB . . . . . . DEM0124B
              TS . . . . .   DEM0124B   TS1
               #TBH. . . .     DEM0124B   HIST_POLICY_INFO
                TB . . . .     DEM0124B   POLICY_INFO
              TS . . . . .   DEM0124B   TS2
    L          #TBH. . . .     DEM0124B   HIST_POLICY_INFO
        *L    TS . . . . .   DEM0124B   TS2H
  7. On the Create Table panel, specify the information about the new history table.
    1. Specify a new name for the table.
    2. Specify the table space name that you specified in step Step 5.
    3. Select Parent Tablespace is being created within this WORKID.
    4. Press END.
  8. On the Mixed List panel, type E in the Act column adjacent to the base table.For example, as shown in the following figure you would type E adjacent to the DEMO124B.POLICY_INFO table.

    Act     Object-Type    Objects
            DB . . . . . . DEM0124B
              TS . . . . .   DEM0124B   TS1
               #TBH. . . .     DEM0124B   HIST_POLICY_INFO
        *L     #TBH. . . .     DEM0124B   HIST_POLICY_INFO_H
    E           TB . . . .     DEM0124B   POLICY_INFO
              TS . . . . .   DEM0124B   TS2
               #TBH. . . .     DEM0124B   HIST_POLICY_INFO
        *L    TS . . . . .   DEM0124B   TS2H
        *L     #TBH. . . .     DEM0124B   HIST_POLICY_INFO_H
  9. Specify a new table name.

    1. On the Table Detail panel, type S to select History Table Information.
    2. Press END.
    3. On the History Table Information dialog, specify the history table name that you specified in Step 7.
    4. Press END.

    Now that the table has been created, you can analyze a work ID and execute a worklist.

    Important

    The worklist contains the following -SQL commands:

    • CREATE TABLESPACE
    • ALTER TABLE DROP VERSIONING
    • CREATE TABLE
    • ALTER TABLE ADD VERSIONING USE HISTORY TABLE

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*