.
contact contact


dbrepack utility

» Usage | Notes | Examples | See also
 
.
  The dbrepack utility allows to repack a database to reclaim disk space occupied by deleted records. Without repacking, deleted records are re-used but the disk space is not freed for use by other data sets or databases.

The dbrepack utility is an "offline utility" that directly accesses the database server volume files and may only be used when the database server is not active (or in online-backup mode when dbrepack is used in read-only mode).

Usage

dbrepack [options] database [set ...]

options:
 -help   - show usage (this list)
 -u user - set user name
 -p pswd - set password
 -c cfg  - server configuration file
 -b size - Buffer cache size (MB)
 -v      - verbose output
 -w      - enable write mode
 -m mb   - max. amount of memory to postpone FTS data processing
 -P pct  - skip set unless at least pct% of disk space reclaimable
 -S mb   - skip set unless at least mb MB disk space reclaimable
 -M      - use master key
By default dbrepack runs in read-only mode and analyzes the specified database unless the -w option is specified. The option -v enables additional progress messages.

The -c option is used to specify the eloqdb.cfg file for the server instance. It defaults to the eloqdb.cfg file in the Eloquence config directory.

The -m option is used to specify the size of a scratch memory pool that is used to collect moved record numbers that have keyword indexes. This is subsequently used to update the FTS index. As this may cause some I/O (but noticeably less than re-building the FTS index) it is done in batches.
The default value is zero. It indicates to use the value configured in the server config [config] RestructMemLimit value (defaults to 100 MB). Otherwise, it specifies the size of the memory pool size in MB and must be between 1 and 2047.

The -M option indicates to request the master key to support encrypted databases. When the -M command line option is present, the EQ_MKEYID and EQ_MKEYFILE environment variables are used to obtain the master key(s) to access encrypted data (requires interactive entry of the pass-phrase).

The dbrepack utility operates in two phases. In the first phase it scans the table to create a region map of gaps and used records. This map is used in phase two to move records from the end (highest record number) to the front until any gaps are filled. This requires updating any chains and indexes.

Notes

  • dbrepack accesses the database volume files. Consequently, the database server may not be active. The dbrepack read-only mode may be used while the server is in online backup mode.

  • dbrepack in write mode modifies the database volume files and will most likely leave the database in a corrupted state upon failure. Please make sure you have a current backup.

  • Running dbrepack in write mode will invalidate replication and forward recovery.

Examples

The example below shows running dbrepack to analyze a database.
$ dbrepack -c eloqdb.cfg -v toydb
Running in Read-Only mode
PRODUCTS        : 2.4 MB reclaimable (96.8%), 1 records repackable (9.1%)
CUSTOMERS       : no space reclaimable
ORDER-MASTER    : 0.1 MB reclaimable (45.0%), no records repackable
INVOICES        : no space reclaimable
ORDERS          : 8.4 MB reclaimable (17.2%), 4934 records repackable (12.5%)
ORDER-DETAILS   : no space reclaimable
Total           : 10.9 MB reclaimable (21.1%)
The reclaimable disk space indicates the disk space that could be reclaimed by repacking a data set. The number of repackable records depends on the number of gaps found in the data set.

Comments

Reclaiming the disk space for deleted records is possible but not recommended unless there is a good cause. Typically deleted records will be re-used in the course of the year and disk space is no longer as limited as it used to be. So one needs to weight the potential efficiency gains by packing the database against the procedure effort.

To use dbrepack with B.08.20, please make sure you have the dbrepack patch PE82-1502090 installed (or superseding). This patch is part of the B.08.20 patch bundle. The most recent dbrepack patch is PE82-1609260 at this time which is _significantly_ faster (and better).

Please keep in mind that

  • Any disk space reclaimed by dbrepack does not shrink the database volume files but is made available in the volume file for other use. If shrinking the volume files is a requirement then the procedure is to repack the databases first, store them in an archive (dbstore), create a new set of volume files and then restore them (dbctl dbrestore).

  • A backup is mandatory when using dbrepack. One backup needs to be taken before using dbrepack. If dbrepack encounters a problem the database is corrupted and can't be repaired. Once dbrepack is completed, another backup is necessary as dbrepack does _not_ update the forward log files and the previous backup and forward log files will no longer apply.

See also

dbrepack utility (B.08.20 release notes)
dbrepack patch PE82-1609260 (beta)


 
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision: 2017-08-29  
  Copyright © 1995-2021 Marxmeier Software AG