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

The -ad server option is used to recover a database by applying all the transaction logs from a specified directory to the backup copy of a database. When this option is specified, the database server applies the transaction logs and then shuts down the database.

To recover from multiple transaction logs using the -ad server option
Example

The following example applies the offline (backup) and current transaction logs to the backup copy of the sample database using the -ad database server option. The database server uses the log offsets in the transaction logs to determine the correct order in which to apply the log files.

  1. Copy the backup transaction log and current transaction log into a directory, for example, c:\backuplogs.

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

    dbeng11 backupdemo.db -ad c:\backuplogs

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

See also