Minimize downtime when rebuilding a database

It is recommended that you make backup copies of your database files before rebuilding a database.

 Minimize the downtime during a rebuild

Verify that no other scheduled backups can rename the production database log. If the log is renamed, the transactions from the renamed logs must be applied to the rebuilt database in the correct order.

  1. Using dbbackup -r, create a backup of the database and log, and rename the log.

  2. Rebuild the backed up database on another computer.

  3. Perform another dbbackup -r on the production server to rename the transaction log.

  4. Run dbtran on the transaction log and apply the transactions to the rebuilt server.

  5. Shut down the production server and copy the database and log.

  6. Copy the rebuilt database onto the production server.

  7. Run dbtran on the log from Step 5.

  8. Start the server on the rebuilt database, but do not allow users to connect.

  9. Apply the transactions from Step 8.

  10. Allow users to connect.

 See also