Understanding Archiving Strategy
This section discusses:
Determining an archiving strategy is essential for using PeopleSoft Data Archive Manager efficiently. This strategy depends on how the archived data will be used. The following describes the strategy for archiving to history table:
Use history tables for storing archived data.
Enable reporting and queries from history tables.
Must have a secondary step to delete archived data from online tables.
Must have additional database space.
The system is designed to provide as much flexibility as possible. By reviewing your business requirements, you will be able to determine which strategic step best fits your business needs.
Here is a high-level-overview of the steps:
You move data into the history tables.
This is known as the selection process. This enables you to query the selected data for information and copy data from the online tables into the history tables.
If you accidentally delete the data from the online tables, there is a process to restore the data back from the history tables.
This rollback process is the optional second step.
When you no longer need to reference the data from the history tables, you can delete them completely from the system.
Archiving to history tables involves using tables that you create for the sole purpose of storing archived data. You must determine whether the archived data should be stored in the history tables temporarily or on a long-term basis.
By definition, history tables are identical copies of the online tables. However, history records must include PSARCHIVE_SBR sub-record that contains the archive ID and batch number. Some PeopleSoft applications deliver history tables prebuilt for use in common archiving processes. If you design a custom archiving scheme, you need to create the history tables using Application Designer.
History Table Considerations
After the archive process moves the data into the history table, the data resides in both the online tables and in the history table; you then have two options:
Deleting the archived data from the online tables.
Leaving the archived rows in the online tables such that the data exists in parallel.
Building History Tables
Before you run the archiving process, you must first create (or build) the history tables.
You must build one history table for each table to be archived. The history table must be identical to the archive table. PeopleSoft Data Archive Manager uses the PSARCHIVE_SBR sub-record that contains PSARCH_ID and PSARCH_BATCHNUM to denote when a piece of data was archived and to uniquely identify it.
The following example uses the record JRNL_HEADER.
To build a history table:
Open Application Designer.
Open the JRNL_HEADER table.
Select File, Save As and name the history table with an appropriate name, such as JRNL_HEADER_HST.
When prompted to copy the PeopleCode associated with the table, click No.
Select Insert, Sub-Record then insert the PSARCHIVE_SBR sub-record.
Save the record.
Build the table by selectingBuild, Current Object .
Select the following build options: Create Tables and Create Indexes.
Select the following build execute options: Execute and Build script.