Maintaining archive data
Suppose that you have historical data that you want to save but do not intend to reference frequently. Db2 can store and maintain that data for you in a separate table that is called an archive table.
About this task
An archive table is associated with a particular base table that is called an archive-enabled table.
Introductory concepts
Procedure
To maintain archive data:
- Create an archive table.
- Turn archiving on and off as needed by using the SYSIBMADM.MOVE_TO_ARCHIVE built-in global variable, as described in Creating an archive table. When archiving is turned on, you cannot update the archive-enabled table.
- For queries against the archive-enabled table, set them to include or exclude archive data as needed by using the SYSIBMADM.GET_ARCHIVE built-in global variable, as described in Archive-enabled tables and archive tables.