-RNAM (Rename object)
The -RNAM command is generated whenever a Db2 object (or table column or view column) is renamed.
The -RNAM command records the changed name in the BMC AMI Change Manager for Db2 database. The Compare component of Change Manager uses these name changes to resolve renamed objects (so that CDL can be generated properly) and to prevent the loss of data when a baseline is one of the inputs for the comparison.
The RENAME TABLE SQL command renames a table, relevant check constraints, and foreign keys. Change Manager accounts for creating and dropping views, synonyms, and aliases and rebinding plans and packages.
For example, if you establish a baseline on a table, then rename a column in the table, and then recover back to the baseline, Compare can generate CDL to successfully restore the old column name. Otherwise, all of the data in that column might be lost when the table is restored.
The -RNAM command must be followed by the object type, the old name (up to three parts, separated by periods), and the new name. In the following example, CO indicates a table column and the column LNAME is renamed to LAST.
Example of -RNAM command
Related topic