Table of contents[Index] FineConnection web site[FineConnection web site]

Database maintenance

Making a backup

In order to project your project data, it is recommended to make a backup of your project database regularly.

There are two options:

  1. "Midnight backups" - Monitor one can make an online, unattended backup of the running project every Midnight (at 0:00).
  2. Instant backups - An online backup (snapshot) of the project database can be made instantly.

Midnight backups

To enable online Midnight backups:

  1. Switch to Designer mode.
  2. Select Options|Global configuration from the menu on the main window.
  3. Select the Database maintenance tab
  4. Check the "Midnight backups.." checkbox.

graphics58It is recommended to leave the "Midnight" option checked!

All Midnight backups are made to separate directories.

Instant backups

To make an instant backup:

  1. Switch to Designer mode.
  2. Select Options|Global configuration from the menu on the main window.
  3. Select the Database maintenance tab
  4. Select one of the two backup options and click the <Start> buttons to make an instant full backup.

Restoring a backup

Each time Monitor one performs a backup, it also creates a command file that can be used to restore the backup. This command file is saved in the same backup directory and has the name: <Project name>_Restore.cmd.

The restore operation can be started by typing <Project name>_Restore.cmd in a command box and providing the Database Username and Password as command-line parameters. The Username/Password must have CREATE DATABASE rights!

graphics59graphics60All backups types are made online however; DO NOT RESTORE A BACKUP ON A RUNNING PROJECT. It will definitely corrupt your project’s database! Before you perform a restore, shutdown Monitor one first!

Database reorganization

Monitor one uses the services of the Firebird database engine for storing and maintaining project data. Every DBA has experienced a situation in which an application slows down after it has been in production for a while. However, why this happens is not always evident. Perhaps the number of transactions issued has increased or maybe the volume of data has increased. However, for some problem, these factors alone will not cause large performance degradation. In fact, the problem might be with disorganized data in the database.

Database disorganization occurs when a database's logical and physical storage allocations contain many scattered areas of storage that are too small, not physically contiguous, or too disorganized to be used productively.

To minimize fragmentation and row chaining, as well as to re-establish clustering, database objects need to be restructured on a regular basis. This process is known as database reorganization. The primary benefit is the resulting speed and efficiency of database functions because the data is organized in a more optimal fashion on disk.

The Monitor one backup/restore options mentioned above can be used for database reorganization.

Follow the steps described below:

  1. Switch to Designer mode.
  2. Select Options|Global configuration from the menu on the main window.
  3. Select the Database maintenance tab.
  4. Press the Start button of the second Instant backup option.
  5. Wait for the backup to finish.
  6. Shutdown Monitor one
  7. Copy the <Projectname>.fdb file in the project directory to another directory on disk (or rename the file)
  8. Run the <ProjectName>_Restore.cmd file that can be found in the backup directory that was created by the Instant backup.
  9. Your project’s database is now in well organized condition again.