2. Using Ingres Commands : arcclean Command—Purge Records from Replicator Shadow and Archive Tables
 
Share this page                  
arcclean Command—Purge Records from Replicator Shadow and Archive Tables
Permission required: This command must be executed from the DBA account or an account that has DB_ADMIN privilege on the databases.
The arcclean command purges unneeded records from the Replicator shadow and archive tables. It then modifies those tables back to their current storage structures. Use this command to reclaim disk space and improve performance.
After the Replicator Server processes data in the local queues, the records remain in the shadow and archive tables. This data continues to grow until you use the arcclean command to purge unneeded records. After arrclean is run, access to the shadow and archive tables is greatly improved.
To detect and resolve collisions, Replicator needs records of the last transactions on each row. Therefore, after arcclean is run, there will still be at least one shadow record for each record in the base table that has been touched by a replicated transaction. However, if there are any records in the input or distribution queues, the associated transactions in the shadow and archive tables also remain. To ensure that records remaining in input and distribution queues are not removed, the arcclean command selects records eligible for deletion and places them in a temporary table. If arcclean aborts, this temporary table should be removed automatically. If it is not removed, you can safely drop the table manually and then rerun arcclean.
You should run the arcclean command at intervals using the job scheduling mechanism of the operating system (such as cron on UNIX, and a batch job on OpenVMS). In UNIX, you can place the arcclean command in a cron file if $II_SYSTEM/ingres/bin is in the path. In OpenVMS, you can run the arcclean command from a batch job if you have executed the ingdbadef.com command file that defines the arcclean symbol.
Caution! Do not use arcclean if you do not have checkpoints and journals or other types of recovery mechanisms. The data purged from the shadow and archive tables can be used to aid recovery in a disaster.
The arcclean command has the following format:
Windows, VMS:
arcclean [vnode::]dbname before_time”[--udba_name]
UNIX:
arcclean [vnode::]dbname ‘before_time’ [-udba_name]
 
[vnode::]dbname
Specifies the name of the database to be cleaned.
before_time
Indicates that all records in the shadow and archive tables dated before the specified date and time are to be purged. Provide the date and time in standard Ingres date and time format. On UNIX, place single quotes around the date and time; on VMS and Windows, use double quotes.
Caution! The date you specify should be before the last successful checkpoint or backup.
-udba_name
Specifies the name of the database owner.