FirebirdSQL logo

Examples of ALTER DATABASE Usage

  1. Adding a secondary file to the database.As soon as 30000 pages are filled in the previous primary or secondary file, the Firebird engine will start adding data to the secondary file test4.fdb.

    ALTER DATABASE
      ADD FILE 'D:\test4.fdb'
        STARTING AT PAGE 30001;
  2. Specifying the path and name of the delta file:

    ALTER DATABASE
      ADD DIFFERENCE FILE 'D:\test.diff';
  3. Deleting the description of the delta file:

    ALTER DATABASE
      DROP DIFFERENCE FILE;
  4. Switching the database to the “copy-safe” mode:

    ALTER DATABASE
      BEGIN BACKUP;
  5. Switching the database back from the “copy-safe” mode to the normal operation mode:

    ALTER DATABASE
      END BACKUP;
  6. Changing the default character set for a database to WIN1251

    ALTER DATABASE
      SET DEFAULT CHARACTER SET WIN1252;
  7. Setting a linger-delay of 30 seconds

    ALTER DATABASE
      SET LINGER TO 30;
  8. Encrypting the database with a plugin called DbCrypt

    ALTER DATABASE
      ENCRYPT WITH DbCrypt;
  9. Decrypting the database

    ALTER DATABASE
      DECRYPT;

DROP DATABASE

Drops (deletes) the database of the current connection

Available in

DSQL, ESQL

Syntax
DROP DATABASE

The DROP DATABASE statement deletes the current database.Before deleting a database, you have to connect to it.The statement deletes the primary file, all secondary files and all shadow files.

Note

Contrary to CREATE DATABASE and ALTER DATABASE, DROP SCHEMA is not a valid alias for DROP DATABASE.This is intentional.