REINDEX DATABASE

From Recital Documentation Wiki
Revision as of 14:48, 16 March 2009 by Yvonnemilne (Talk | contribs)

Jump to: navigation, search

REINDEX DATABASE

Class

Databases


Purpose

Rebuilds the indexes for each table in the active database or rebuilds the catalog index tags for a specified database


Syntax

REINDEX DATABASE [<database name> | ?]


See Also

ALTER INDEX, ALTER TABLE, BACKUP DATABASE, CLOSE DATABASES, CLOSE TABLES, COMPILE DATABASE, CREATE DATABASE, CREATE TABLE, CREATE INDEX, CREATE VIEW, DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY TABLES, DROP DATABASE, DROP INDEX, DROP TABLE, INDEX, LIST DATABASE, LIST INDEXES, LIST TABLES, OPEN DATABASE, PACK DATABASE, REBUILD DATABASE, RESTORE DATABASE, USE, SET AUTOCATALOG, SET EXCLUSIVE, ADATABASES(), DBUSED(), GETENV(), DB_DATADIR, DB_MAXWKA


Description

The REINDEX DATABASE command rebuilds the indexes for each table in the active database.

Databases in Recital are implemented as directories containing files that correspond to the tables and associated files in the database. Operating System file protection can be applied individually to the files for added security. The directories are sub-directories of the Recital data directory. The environment variable / symbol DB_DATADIR points to the current Recital data directory and can be queried using the GETENV() function. Files from other directories can be added to the database using the ADD TABLE command or via the database catalog and SET AUTOCATALOG functionality. Databases are opened using the OPEN DATABASE command.

If the <database name> is specified, the REINDEX DATABASE command will operate on the specified database's catalog file: the catalog's index tags will be rebuilt. If the question mark, '?', is included instead of the <database name>, the 'SELECT A FILE' dialog will be displayed, allowing the user to select the database. The dialog defaults to the DB_DATADIR directory.


Example

VFP/SQL>open database southwind
VFP/SQL> reindex database
VFP/SQL>close databases
VFP/SQL> reindex database southwind


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer