Mimer SQL Reference Manual TOC PREV NEXT INDEX

Mimer Developer Site



Sets a databank offline or online, with the option of clearing LOGDB records for it.




Setting a databank OFFLINE makes it unavailable for all users and closes the databank file. A typical use for this is when taking databank backups using the host file system.

If the databank is being used, an error will be raised and it will not be set offline. When a databank is set offline, all online shadows will be brought up to date.

When a databank is set ONLINE again, you must specify whether to clear the LOGDB records for it (using the RESET LOG option), or whether to preserve these (using the PRESERVE LOG option). The RESET LOG option should be used after a successful backup has been taken.

It is essential to keep LOGDB in a state consistent with the databank backups, see the Mimer SQL System Management Handbook for a discussion of issues relating to Backup & Restore. Clearing records from LOGDB is handled automatically when CREATE BACKUP and CREATE INCREMENTAL BACKUP are used to take databank backups.


The current ident must either be the creator of the databank or have BACKUP privilege.


While a databank is OFFLINE none of the tables stored in it are accessible and the updating of all its shadows is suspended. It is possible to use ALTER DATABANK and ALTER DATABANK RESTORE to change or recover a databank while it is OFFLINE.

If ALTER DATABANK was used to change the location of the databank file while the databank was OFFLINE, the SET DATABANK statement will verify that the new file contains a valid copy of the databank when the databank is set ONLINE again (it cannot, however, check that the contents of the file is up-to-date).

It is possible to use DROP DATABANK to drop an OFFLINE databank.

While a databank is OFFLINE, it is not possible to use ALTER SHADOW on any of its shadows.

An error will be raised if an attempt is made to set a databank OFFLINE that is already OFFLINE, or ONLINE when it is already ONLINE.

Standard Compliance

Support for the SET DATABANK statement is Mimer SQL extension.

Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
Mimer SQL Reference Manual TOC PREV NEXT INDEX