2. Using Ingres Commands : arcclean Command—Purge Records from Replicator Shadow and Archive Tables : arclean Example
 
Share this page                  
arclean Example
The following example purges from the database all records before a certain date.
Before issuing the arcclean command in this example, follow these steps to prepare the environment:
1. Make sure that you have valid checkpoints or backups of all databases to be cleaned. The date you specify in the arcclean command should be before the checkpoint or backup date.
Removing records without a valid checkpoint could hinder recovery in the event of a system failure. For details, see the reconcil Command (see page reconcil Command—Assist in Recovering Lost Data).
2. Deny user access to all databases involved.
There should be no new transactions during the cleaning process. Also, the shadow and archive tables need exclusive locks to the base tables during the modification procedure.Make sure the input and distribution queues are empty. You can do this by allowing the servers to run until they complete processing of all pending transactions.
If records remain in the queues, the arcclean process will retain the relevant records in the shadow and archive tables on the local database. However, arcclean does not know which transactions are pending on other databases, and could therefore remove records on the local database that are required for an outstanding transaction on a target database. This situation may generate collisions when the outstanding transactions are distributed.
This command purges all records dated before 20-Feb-04 from the remote hq database:
Windows, VMS:
arcclean nyc::hq ‑unyc_dba “20-feb-04”
UNIX:
arcclean nyc::hq ‑unyc_dba ‘20-feb-04’