Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - SQL Usage » Data import and export » Database rebuilds

 

Minimizing downtime when rebuilding a database

You can minimize downtime when rebuilding a database by using the backup and log translation utilities.

Prérequis

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

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

You must have the BACKUP DATABASE system privilege.

 Task
  1. Using dbbackup -r, create a backup of the database and log, and rename the transaction 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 the dbtran utility on the transaction log and apply the transactions to the rebuilt database.

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

  6. Copy the rebuilt database onto the production server.

  7. Run dbtran on the transaction log from Step 5.

  8. Start the rebuilt database on a personal server (dbeng16), to ensure that users cannot connect.

  9. Apply the transactions from Step 8.

  10. Shut down the database server and start the database on a network server (dbsrv16), to allow users to connect.

Résultat

Downtime is minimized during the rebuild of a database.

 See also