Rebuilding Primary Keys

Rebuilding primary keys in a physical diagram updates primary keys for tables by creating primary keys for tables that have no key and a single unique index. Rebuilding primary keys is useful when not all of the primary keys could be reverse engineered from a database, or if you did not select the rebuild option for primary keys during reverse engineering.

  1. Select Tools > Rebuild Objects > Rebuild Primary Keys to open the Rebuild Primary Keys dialog box, which lists all the tables in the current model.


    Note: To rebuild the primary keys in package, select the package from the list at the top of the tab. To rebuild the primary keys in a sub-package, click the Include Sub-Packages tool, and then select a sub-package from the dropdown list.
  2. Select the tables containing the primary keys that you want to rebuild and then click OK.