Recover a database with multiple transaction logs using the -a server option

The -a server option is used recover a database by applying a single transaction log file to the backup copy of a database. When this option is specified, the database server applies the log and then shuts down. If you have multiple transaction logs, you must apply them one at a time in the correct order, from oldest to most recent.

To recover from multiple transaction logs using the -a server option
  1. Start the database server using -a to apply the backup transaction log to the offline (backup) copy of your database.

    See -a database option.

  2. Start the database server and apply the current transaction log to the backup copy of your database.

Example

The following example applies the offline (backup) and current transaction logs to the backup copy of the sample database using the -a database server option.

  1. Start the database server and apply a backup transaction log called backupdemo.log to the backup copy of a database called backupdemo.db:

    dbeng11 backupdemo.db -a backupdemo.log

    The database server applies the backup transaction log to the backup copy of the database and then shuts down.

  2. Start the database server and apply the current transaction log called demo.log to the backup copy of the database:

    dbeng11 backupdemo.db -a demo.log

    The database server applies the current transaction log to the backup copy of the database and then shuts down.

See also