Administer > Database administration > Data persistence > Database dictionary > Making database dictionary changes

Making database dictionary changes

Before making database dictionary (dbdict) changes, consider the following behaviors and constraints.

A database dictionary (dbdict) update will fail if:

  • A SQL data type is changed and it is not a change from CHAR to VARCHAR or from VARCHAR to CHAR (VARCHAR2 on Oracle).
  • A SQL data type is changed and it is not a change from NCHAR to NVARCHAR or from NVARCHAR to NCHAR on Microsoft SQL Server or Oracle (NVARCHAR2).
  • A SQL data type is changed and it is not a change from GRAPHIC to VARGRAPHIC or from VARGRAPHIC to GRAPHIC on DB2.
  • A SQL data type is changed and it is a change from NCHAR to CHAR or from NVARCHAR to VARCHAR on Microsoft SQL Server.

  • A SQL data type CHAR or VARCHAR is shortened.
  • ALTER TABLE statements were generated but failed to execute.

A full table copy is triggered for any of the following conditions:

  • The RC flag changes for any field.
  • The alias changes for any field (but not from or to a NULLTABLE alias).
  • A new table is defined for a dbdict.
  • The SQL dbtype changed significantly. (For example, either from db2universal to sqlserver, or from one sqlserver2k to sqlserver IF those two SQL dbtypes use different sqldb or sqllogin parameter values.)

An ALTER TABLE statement will be generated to accomplish any of the following changes:

  • A SQL data type changed from CHAR to VARCHAR, or vice versa (VARCHAR2 on Oracle).
  • A SQL data type changed from NCHAR to NVARCHAR, or vice versa on Microsoft SQL Server.
  • A SQL data type changed from VARCHAR to NVARCHAR on Microsoft SQL Server.

  • A SQL data type changed from NCHAR to NVARCHAR2, or vice versa on Oracle.
  • A SQL data type changed from GRAPHIC to VARGRAPHIC, or vice versa on DB2.
  • A SQL data type was widened (for example, from CHAR(10) to CHAR(15)).
  • A SQL column was renamed.
  • A table was renamed.

On DB2, certain ALTER TABLE operations require a REORG of the affected table. Service Manager executes these REORGs, if:

  • An ALTER TABLE ... DROP COLUMN statement was executed.
  • A SQL column was renamed.
  • A SQL type was changed (but not if the change was only widening VARCHAR or VARGRAPHIC columns).

A DROP TABLE statement will be generated if a table entry was completely removed from the SQL Tables tab.

If Service Manager determines it does not have rights to CREATE a TABLE, it will assume not having the rights of performing any of the above operations. In that case it will write all database definition language (DDL) into files in the <RUN directory>/ddl folder and accept changes to the dbdict without performing any of the above operations. It will, however, still verify that the SQL type changes are valid.

Related topics

Methods for updating database dictionary records
Methods for deleting database dictionary records
Adding a key
Modifying a key
Deleting a key

Change data types: Character to number
Remove a field from an existing database dictionary record