Contents Index Rebuilding a database involved in replication Extracting data

ASA SQL User's Guide
  Importing and Exporting Data
    Rebuilding databases

Minimizing downtime during rebuilding


The following steps help you rebuild a database while minimizing downtime. This can be especially useful if your database is in operation 24 hours a day.

It's wise to do a practice run of steps 1-4, and determine the times required for each step, prior to beginning the actual backup. You may also want to save copies of your files at various points during the rebuild.

Make sure that no other scheduled backups rename the production database's log. If this happens in error, you will need to apply the transactions from these renamed logs to the rebuilt database in the correct order.

To rebuild a database and minimize the downtime

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

  2. Rebuild the backed up database on another machine.

  3. Do another DBBACKUP -r on the production server to rename the log.

  4. Run DBTRAN on the log from step 3 and apply the transactions to the rebuilt server.

    You now have a rebuilt database that contains all transactions up to the end of the backup in step 3.

  5. Shut down the production server and make copies of the database and log.

  6. Copy the rebuilt database onto the production server.

  7. Run DBTRAN on the log from step 5.

    This should be a relatively small file.

  8. Start the server on the rebuilt database, but don't allow users to connect.

  9. Apply the transactions from step 8.

  10. Allow users to connect.


Contents Index Rebuilding a database involved in replication Extracting data