Creating a Composite Key

Use this procedure when you need to create a composite key.

To create a composite key

  1. Modify script.user_layout.primary_tablename to do the following:
    • Set the set_name column of the DATASETS client control table entry for the data set in question to "user_set".
    • Specify which items should be part of the composite key by assigning the appropriate values to the corresponding entries for the item_key column of the DMS_ITEMS client control table. Such entries are identified by the values of the dms_item_name and the dataset_name columns.

    For information on changing the index from my_aa to a composite key after the data set has been cloned, see Changing an Index from AA Values to a Composite Key.

  2. After you create the composite key, do one of the following:
    • If you have not cloned any tables, run the dbutility define command again.
    • If you have cloned tables, set the status_bits column for the corresponding entry in the DATASETS client control table to 8, and run a redefine command.
  3. Generate new scripts by running the dbutility generate datasource command from the working directory that for the data source.
  4. Clone or reclone the data sets by running dbutility process datasource from the same directory.