-20555 AN ARCHIVE-ENABLED TABLE IS NOT ALLOWED IN THE SPECIFIED CONTEXT. REASON CODE reason-code.

Explanation

The statement or query cannot reference an archive-enabled table for the indicated reason.

reason-code
A numeric value that identifies the reason for the error. reason-code can have one of the following values:
1
The SQL statement cannot reference both an archive-enabled table and a temporal table. (The temporal table can be either a system-period temporal table or an application-period temporal table.) For example, a query, a view definition, or an INSERT, UPDATE, or DELETE statement cannot reference both of these table types.
2
Start of changeAn INSERT, UPDATE, or MERGE statement cannot reference an archive-enabled table as the target of its operation when the value of the SYSIBMADM.MOVE_TO_ARCHIVE global variable is Y.End of change
3
An SQL table function cannot reference an archive-enabled table when both of the following conditions are true:
  • The value of the SYSIBMADM.GET_ARCHIVE global variable is Y.
  • The value of the ARCHIVESENSITIVE bind option is YES.
4
The definition of a row permission or column mask that is activated by a data change statement or query cannot reference an archive-enabled table when both of the following conditions are true:
  • The value of the SYSIBMADM.GET_ARCHIVE global variable is Y.
  • The value of the ARCHIVESENSITIVE bind option is YES.

System action

The statement cannot be processed.

User response

Change the query or statement to remove the reference to the archive-enabled table and specify another table.

SQLSTATE

428I6