MOVE_TO_ARCHIVE built-in global variable

MOVE_TO_ARCHIVE global variable contains a string value that indicates whether the deletion of a row of an archive-enabled table should result in storing a copy of the deleted row in the associated archive table.

This MOVE_TO_ARCHIVE global variable has the following characteristics:
  • It is updatable, with values maintained by the user.
  • The type is CHAR(1).
  • The schema is SYSIBMADM.
  • The scope of this global variable is session.
The global variable can be set to the following:
Y
Start of changeSpecifies that a delete of a row in an archive-enabled table will result in storing a copy of the deleted row in the associated archive table. Additionally, when the global variable is set to 'Y', an INSERT, UPDATE, or MERGE statement that specifies the archive-enabled table as the target of its operation returns an error.End of change
E
Specifies that a delete of a row in an archive-enabled table will result in storing a copy of the deleted row in the associated archive table.
N
Specifies that a delete of a row in an archive-enabled table will not result in storing a copy of a deleted row in the associated archive table.

The default value is determined from the value of the MOVE_TO_ARCHIVE_DEFAULT subsystem parameter in macro DSN6SPRM.