How Archiving Works

<< Click to Display Table of Contents >>

Navigation:  General Functions > Archiving Customer Data (ESI Only) >

How Archiving Works

Once the initial setup for archiving has been performed, thereby enabling the specific MIE instance to perform archiving, archiving will be handled automatically by Housekeeping.

Here are the steps performed by Housekeeping when archiving:

1. Determine if there are any customer records, in the current main database, that have been marked as inactive and archive.

2. If so, for each customer so marked (up to the max number of customers that will be performed per Housekeeping run), determine if a database has been created for that customer's archive data.  If not, the database will be created and named C<custNo>_Archive.  The database will be created on the SQL server specified by the connection string in the dataWebServices table.

3. All Timed Ops jobs will be turned off.

4. All user accounts will be marked as locked and their expiration will be set to the current date.

5. A control table will be written to the archive database, named ArchiveTables.  It will be populated with a list of all MIE tables to be archived.

6. The first N tables will be read from the control table and archived, record by record.  As a record is successfully archived, it is removed from the main MIE database. N is the max number of tables defined for Housekeeping to archive per customer in any given run.

7. After tables have been archived, Housekeeping will check the following conditions:

 a. The number of tables created in the archive database during the run

 b. The number of records removed from the main MIE database during the run

 c. The number of records remaining in the control table that still need processing.

If all three of those conditions are 0, it means that archiving is complete and the MIE will mark the customer record in the main MIE database as archived by performing the following:

 a. The date archiving ended is populated

 b. The Archive flag is reset (set back to 0)

8. Since not all tables are archived on any given Housekeeping run, all runs after the first run will continue to work against the ArchiveTables control table, looking for tables defined in that control table that have not yet been archived (DateArchived is null).  That will continue until Housekeeping has run sufficient times to process all tables.

 

NOTE:  There will be only one record in the dataCustomers table for any given customer.  That record will be archived but will not be removed from the active MIE (in order to preserve some history of the customer and what happened to their data).  The archiving process writes the exact connection string (encrypted) to the customer record.  The connection string can be used subsequently to access the customer's data (assuming it is still online).

The customer record on the active MIE will also have a log of the entire archive process.