Restrictions for Modifying a Table Schema

Restrictions when modifying table schema.

  • You cannot run alter table from inside a transaction.
  • Altering a table’s schema can invalidate backups that you made using bcp. These backups may use a table schema that is no longer compatible with the table’s current schema.

  • You can add NOT NULL columns with check constraints, however, the SAP ASE server does not validate the constraint against existing data.

  • You cannot change the locking scheme of a table using the alter table . . . add, drop, or modify commands if the table has a clustered index and the operation requires a data copy. Instead you can
    1. Drop the clustered index.

    2. Alter the table’s schema.

    3. Re-create the clustered index.

  • You cannot alter a table’s schema if there are any active open cursors on the table.