Difference between revisions of "RESTORE DATABASE"
Helengeorge (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(One intermediate revision by one user not shown) | |||
Line 14: | Line 14: | ||
The RESTORE DATABASE command issues an INSTALL to import bridge files, tables and associated memo, dictionary and multiple index files into the currently open or specified database. The files must be in ASCII format previously created by the BACKUP DATABASE command and can be transferred from a binary incompatible platform. | The RESTORE DATABASE command issues an INSTALL to import bridge files, tables and associated memo, dictionary and multiple index files into the currently open or specified database. The files must be in ASCII format previously created by the BACKUP DATABASE command and can be transferred from a binary incompatible platform. | ||
− | 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 | + | 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 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. |
If the <database name> is omitted, the RESTORE DATABASE command will operate on the active database. If no database is currently open, an error will be returned. If the question mark, '?', is included instead of the <database name>, the 'SELECT A FILE' dialog will be displayed, allowing the user to select a database. The dialog defaults to the DB_DATADIR directory. This is only applicable for Recital Terminal Developer: for Recital Database and Mirage Servers, the <database name> must be specified if the required database is not already open. | If the <database name> is omitted, the RESTORE DATABASE command will operate on the active database. If no database is currently open, an error will be returned. If the question mark, '?', is included instead of the <database name>, the 'SELECT A FILE' dialog will be displayed, allowing the user to select a database. The dialog defaults to the DB_DATADIR directory. This is only applicable for Recital Terminal Developer: for Recital Database and Mirage Servers, the <database name> must be specified if the required database is not already open. | ||
Line 24: | Line 24: | ||
<code lang="recital"> | <code lang="recital"> | ||
// On Source machine: | // On Source machine: | ||
− | + | backup database southwind | |
// Transfer southwind sub-directory from DB_BACKUPDIR on source machine | // Transfer southwind sub-directory from DB_BACKUPDIR on source machine | ||
Line 30: | Line 30: | ||
// On Target Machine | // On Target Machine | ||
− | + | restore database southwind | |
</code> | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:SQL]] | [[Category:SQL]] |
Latest revision as of 17:30, 22 December 2009
Purpose
Imports bridge, table, and associated files into the current or specified database from ASCII format files created by the BACKUP DATABASE command
Syntax
RESTORE DATABASE [<database name> | ?]
See Also
ADATABASES(), ADD TABLE, ALTER INDEX, ALTER TABLE, BACKUP DATABASE, BUILD, CLOSE TABLES, COMPILE DATABASE, COPY DATABASE, CREATE DATABASE, CREATE INDEX, CREATE TABLE, CREATE VIEW, DATABASE(), DB_DATADIR, DBUSED(), DISPLAY DATABASE, DISPLAY INDEXES, DISPLAY SCHEMAS, DISPLAY TABLES, DROP DATABASE, DROP INDEX, DROP TABLE, GETENV(), INSTALL, LIST DATABASE, LIST INDEXES, LIST SCHEMAS, LIST TABLES, OPEN DATABASE, PACK DATABASE, REBUILD DATABASE, REINDEX DATABASE, SET EXCLUSIVE, USE
Description
The RESTORE DATABASE command issues an INSTALL to import bridge files, tables and associated memo, dictionary and multiple index files into the currently open or specified database. The files must be in ASCII format previously created by the BACKUP DATABASE command and can be transferred from a binary incompatible platform.
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 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.
If the <database name> is omitted, the RESTORE DATABASE command will operate on the active database. If no database is currently open, an error will be returned. If the question mark, '?', is included instead of the <database name>, the 'SELECT A FILE' dialog will be displayed, allowing the user to select a database. The dialog defaults to the DB_DATADIR directory. This is only applicable for Recital Terminal Developer: for Recital Database and Mirage Servers, the <database name> must be specified if the required database is not already open.
The ASCII files must be in a sub-directory of the Recital backup directory. The environment variable / symbol DB_BACKUPDIR points to the current Recital backup directory and can be queried using the GETENV() function. The sub-directory must have the same name as the database.
Example
// On Source machine: backup database southwind // Transfer southwind sub-directory from DB_BACKUPDIR on source machine // to DB_BACKUPDIR on target machine // On Target Machine restore database southwind
Products
Recital Server, Recital