Preparing the Database
The concept of Archiving is based on the assumption
that the Archiving database has exactly the same schema as the source
(operational) database, but the Archiving database has no or a very limited
amount of data with all constraints disabled. To achieve a properly configured
environment with both a source (operational) and Archive (destination)
database, the following steps need to be performed:
- Create a backup of the original (operational)
database and restore it as an Archive database.
- Delete all of the data on the Archive
database. The delivered auxiliary Stored Procedure can be used to
delete all of this data. This Stored Procedure is installed together
with the DELMIA Apriso Archiving Engine. The administrator can choose
between deleting all of the data on the Archiving database or keeping
the MODEL or PRIME data if he or she wants to have the possibility
of running DELMIA Apriso on the Archiving database. If the administrator
wants to keep model or prime data, he or she needs to use a procedure
for deleting the non-prime data available in DELMIA Apriso. The procedure
for deleting data on the destination database is:
- For Microsoft SQL – FlexNetArchive_DeleteAllData
- For Oracle – FLEXNET_ARCHIVE.DeleteAllData
- If the destination database is running
the Microsoft SQL Server and is located on a different server than
the source (operational) database, the administrator needs to remove
the Identity property on all of the columns for all of the tables
that are intended to obtain the archived data. This manual step is
necessary because the T_SQL instruction “SET IDENTITY_INSERT table_name
OFF”, which is used by the Archiving Engine, does not work across
database servers.
- On Oracle, execute the following procedure
on the Archiving database to disable all of the triggers that automatically
populate the ID columns in the DELMIA Apriso tables: FLEXNET_ARCHIVE.DisableAllIdentities.
- Disable all of the constraints on the
Archive database. There is a Stored Procedure installed together with
the DELMIA Apriso Archiving Engine facilitating this step that needs
to be run on the destination (Archiving) database:
- For Microsoft SQL – FlexNetArchive_DisableAllFKConstraints
- For Oracle – FLEXNET_ARCHIVE.DisableAllFks
- Create a link between the original
database and the Archive database. See Database
Link Usage for an explanation on how to create and use
links between the original and Archive databases.
- Install the DELMIA Apriso Archiving
Engine on the destination database. You can deploy the DELMIA Apriso
Archiving Engine to the destination database either by connecting
to it or by using this menu option: File
| Deploy Apriso Archiving Engine.