URL: http://www.firstbasesoftware.com/man/man1/dbclean.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]


NAME

dbclean - clean a FirstBase database and create a map file

SYNOPSIS

dbclean [-b] [-y] [-f] database [database ...]

DESCRIPTION

Dbclean cleans a FirstBase database, removing all free and fragmented storage areas in the database, and creates a new record map for the database. This cleaning is done on a byte by byte basis, making any existing indexes for the database unusable. (But, see dbregen(1) to regenerate all indexes).

To determine the amount of free and fragmented space in a FirstBase database, use dbcheck(8).

The -b flag will run the FirstBase tool in batch mode, suitable for shell scripts. This mode produces no output on the terminal, thus can also be used when running the process in the background. The -y flag will run the tool at the terminal without pausing to ask the user if existing files can be destroyed and without displaying a 'picture' of the requested task.

In normal operation, cleaning is done only if a map file is lost, or disk space needs reclaiming. However, FirstBase databases should be cleaned once they become static or are to be taken off line.

The -f flag is used to force a dbclean(1) to run. Normally, if a database is shut down in an unknown state, i.e. becomes "dirty", dbclean(1) will not work. The idea is to force the use of dbdump(8) and dbrestor(8). However, by using the -f option, dbclean will do its best to clean up the database.

There are a few FirstBase tools that automatically run dbclean(1) when they have completed their tasks. These tools are dbcgen(1), dbcat(1), dbjoin(1), dbload(1), and dbpack(1). All of these tools, except dbpack(1), create a new database, making the cleaning necessary. Dbpack(1) disturbs the order of the existing records, making post cleaning a necessity also.

At the end of normal processing, dbclean(1) runs dbregen(1) to recreate any autoindexes defined for the FirstBase database. The user only needs to worry about any indexes that are non-automatic. These will need to be regenerated (dbregen(1), dbigen(1)).

Note: since cleaning a database aligns a new data map with the data file, the index generators, dbregen(1) and dbigen(1) are passed the -B argument flag to enable record blocking.

FILES

*.map
FirstBase database map file.

dbase
default name of database.

*.cdb
FirstBase database.

*.ddict
FirstBase database dictionary file.

.DBCLN_??????
Temporary file used to build the new database.

SEE ALSO

dbcheck(8), dbregen(1), dbcgen(1), dbcat(1), dbjoin(1), dbload(1), dbpack(1), dbdump(8), dbrestor(8)

FirstBase User's Guide and Reference Manual

DIAGNOSTICS

Again, dbclean(1) will make any existing non-automatic indexes for the FirstBase database unusable. These indexes will need to be regenerated.

Also, dbclean(1) needs to be run in the same directory as the database (or at least on the same logical device) as temporary storage is used in the current working directory to build the new database.


URL: http://www.firstbasesoftware.com/man/man1/dbclean.htm
Last modified: 12 September 1995
Copyright © by FirstBase Software.
[ Index of Contents] [ FirstBase RDBMS Overview]