Previous Topic

Book Contents

Book Index

Next Topic

Archive Maintenance

Customization (on-site customization, hotfixes) performed on the main database schema after the archive was created may require an update of the archive schema.

The following changes performed on the main database schema should be propagated to the archive schema:

  • Adding a database table
  • Adding a table column

    Missing database tables and columns would cause the archiving process to fail.

  • Adding a database view

    New database views should also be added to the archive schema to ensure consistent viewing of archived data.

Changes that should NOT be propagated to the archive schema include:

  • The addition of database elements intentionally excluded from archiving (foreign key constraints, indexes, triggers)
  • Data

    Actual data must be added to the archive exclusively via the archiving process. Changes in the archive should not be implemented by importing an XML file.

    On rare occasions, the update sql may contain not only structural changes, but also a mandatory update of data (some data transformation, elimination of duplicates, etc.). In this case a decision has to be made whether to follow the rule that archived records are never updated or to selectively update also the data in the archive. This decision will have to be made on a per case basis.

The recommended way to keep the archive schema correctly synchronized with the main database schema is to use Valuemation Customization Transfer Manager. If for some reason Customization Transfer Manager cannot be used, it is necessary to manually edit the standard update sql according to the above listed rules before applying it to the archive database.

Update strategies

Although the strict need for structural updates in the archive schema applies only to database tables of object types for which archiving is performed, it is advisable to keep the archive schema 'consistently' updated.

Two update strategies can be used:

  • Whenever structural changes are transfered from the development environment to the productive environment, always transfer them also to the archive schema.
  • Transfer "in real time" only structural changes applied to the archived tables and remember to compare and synchronize the entire databases from time to time.

    Database compare can be done using command 'Compare DDL' in the Valuemation Console.

    1. In the Console, open the 'SQL' menu and select 'Compare DDL'.
    2. The 'Compare DDL' dialog opens. Use drop-down field 'Compare against session' to select the comparison database (select 'ARCHIVE' in this case, another option is 'EXPORT_ORIG').
    3. Leave field 'Table/view name (* wildcard)' empty. (This field makes it possible to restrict the comparison. We want to compare the whole database.)
    4. Click 'Ok' to start the comparison.

    If 'ARCHIVE' has been selected in step 2, the comparison automatically ignores differences that are irrelevant for the archive schema (foreign key constraints, indexes and database triggers).
    For example: If a new table column, index and trigger have been added to the main schema as part of an update, only the addition of the table column will be listed among the differences. This way it is possible to update the archive schema on the basis of the comparison without any need to further 'filter' the comparison result.

See Also

Archiving

What is the Archive

Archive Creation

Archiving Configuration

Running the Archive Action

Viewing the Archived Data