| Name: | PACK | Shortest: | PAC |
|---|---|---|---|
| Family: | Command | Category: | Data Integrity |
| Description: | Use the PACK command on an open database to recover unusable disk space. | ||

dbname
Specifies the name of the database to pack.
PASSWORD
Use this option to clean out bogus rows from SYS_PASSWORDS table.
PACK PASSWORD command is also supported in a multi-user session. Database must be CONNected in order to use this command.
KEYS
Packs only File 3 (indexes).
INDEX
This will pack all the indices for currently CONNected database, even in a Multi-User
environment.
INDEX indexname
Packs a specified index from File 3 (indexes); this option will work when STATICDB
is set on.
INDEX FOR tablename
This will pack all the indices for the specified table, even in a Multi-User
environment.
SCHEMA
Packs only File 1 (schema information).
ALL
Packs File 1 (schema information), File 2 (data), File 3 (indexes), and File
4 (large object data).
WITH USER CASE
Replaces the case folding/collating tables in the database with those defined
in the user configuration file (RBASE.CFG).
About the PACK Command
Disk space becomes unusable when you delete rows or indexes, remove columns or tables, or add or modify columns with the ALTER TABLE command. To use the PACK command, a database must be open. If the database you want to pack is not in the current directory, include the drive, path, and database name. When you pack a database that is in a different directory, R:BASE closes any open database, then opens the database you want to pack.
PACK requires the database owner's user identifier if the database is protected by the owner's user identifier.
You cannot use PACK when a database is stored on a network drive and MULTI has been set on. Set MULTI off before packing the database.
PACK is unavailable when transaction processing is on.
Because you pack an open database, back up your database before you pack it. An interruption to a pack could cause damage to your database. Use the BACKUP command or the Backup/Restore Database option from the Utilities menu in R:BASE for Windows to back up your database.
Both the PACK and RELOAD commands recover unusable disk space; however, RELOAD requires more disk space than PACK because RELOAD copies a database table by table, collects the rows of each table, then reorganizes the rows on the disk.
The following command packs the concomp database in the RBWIN directory on drive C:
PACK c:\rbwin/concomp