Purge snapshot log
The purge snapshot log process deletes snapshot logs from the SCV snapshot log table.
This process is implemented using the PURGE_SNAPSHOT_LOG program.
The PURGE_SNAPSHOT_LOG program considers these input parameters:
- C2*
- The SCV database connection details.
- SNAPSHOTS_TO_KEEP
- The number of snapshot log records to maintain after deleting. Note: By default, the value is set to 3.
- SOURCE
- The source system from which the planning data in the snapshot log is imported.
The PURGE_SNAPSHOT_LOG program purges snapshot logs as follows:
- Logs new log record.
- Identifies the latest <SNAPSHOTS_TO_KEEP> records for each distinct table_name if the Source parameter is specified in the SZ_SNAPSHOT_LOG_TABLE table.
- Includes the snapshot_id of each SZ_SNAPSHOT_LOG_TABLE record available in the PURGE_SNAPSHOT_LOG program in the <snapshot IDs to keep> list.
- Deletes all records from the SZ_SNAPSHOT_LOG_TABLE table where the snapshot_id value is not in the <snapshot IDs to keep> list.
- Deletes all records from the SZ_SNAPSHOT_LOG table where the snapshot_id value is not in the <snapshot IDs to keep> list.
- Commits the changes upon successful deletion.
- Completes the log record with the actual status.
This table lists default values for the input parameters of the PURGE_SNAPSHOT_LOG program:
Parameter | Default value | Description | Possible values |
---|---|---|---|
C2_PROVIDER | sqlserver | SCV DB connection parameters: SCV database type. | sqlserver |
C2_HOSTNAME | <scv-server> | SCV DB connection parameter: SCV database server name or IP number. | |
C2_PORT | <scv-port> | SCV DB connection parameter: SCV database port number. | |
C2_DATABASE | <scv-database> | SCV DB connection parameter: SCV database name. | |
C2_INSTANCE | <scv-instance> | SCV DB connection parameter: SCV database instance name. | |
C2_USER | <scv-user> | SCV DB connection parameter: SCV database username. | |
C2_PASSWORD | <scv-password> | SCV DB connection parameter: SCV database password. | |
JOBID | <external-jobid> |
Program logic parameter: External Job ID. This parameter is used when the PURGE_SNAPSHOT_LOG program is executed as part of another job. |
|
SNAPSHOTS_TO_KEEP | 3 | Program logic parameter: Number of snapshot records to maintain per table snapshot. | Integer value. |