Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

DBMS_SNAPSHOT.PURGE_LOG

Purpose

To purge rows from the snapshot log. For additional information, refer to [*].

Syntax

The parameters for the PURGE_LOG procedure are described in Table 12 - 187. The syntax for this procedure is shown below:

DBMS_SNAPSHOT.PURGE_LOG(
			master	IN	VARCHAR2,
			num	IN	BINARY_INTEGER DEFAULT 1
			flag	IN	VARCHAR2 DEFAULT 'NOP')

parameter description
master Name of the master table.
num Number of least recently refreshed snapshots whose rows you want to remove from snapshot log. For example, the following statement deletes rows needed to refresh the two least recently refreshed snapshots:
EXECUTE dbms_snapshot.purge_log('master_table', 2);
To delete all rows in the snapshot log, indicate a high number of snapshots to disregard, as in this example:
EXECUTE dbms_snapshot.purge_log('master_table', 9999);
This statement completely purges the snapshot log that corresponds to MASTER_TABLE if fewer than 9999 snapshots are based on MASTER_TABLE. A simple snapshot whose rows have been purged from the snapshot log must be completely refreshed the next time it is refreshed.
flag Specify DELETE to guarantee that rows are deleted from the snapshot log for at least one snapshot. This argument can override the setting for the argument NUM. For example, the following statement deletes rows from the least recently refreshed snapshot that actually has dependent rows in the snapshot log:
EXECUTE dbms_snapshot.purge_log('master_table', 0, 'DELETE');
Table 12 - 187. Parameters for DBMS_SNAPSHOT.PURGE_LOG


Contents Index Home Previous Next