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

SQL Anywhere 12.0.1 » SQL Anywhere Server - Database Administration » Database maintenance » Backup and data recovery » Database recovery » Database recovery with multiple transaction logs


Recovering a database with multiple transaction logs using the dbtran utility
 Recover from multiple transaction logs (dbtran utility)

Using -a or -ad to apply logs is recommended over using the Log Translation utility (dbtran) to recover a database with multiple transaction logs.

The Log Translation utility (dbtran) should be used as a last possible option

To maintain the integrity of your data when you use dbtran to translate multiple transaction logs, you must specify both the -m and -n options. The -m option instructs the Log Translation utility (dbtran) to generate a file (named by -n) containing all the transactions from the logs in the specified directory.

You need to use -m because any transactions that span transaction log files could be rolled back if you translate each log individually using dbtran. When dbtran translates a log, it adds a ROLLBACK statement to the end of the log to undo any uncommitted transactions. When a transaction spans two logs, the COMMIT for the transaction occurs in the second log file. Operations at the end of the first log file would be rolled back by dbtran because the file does not contain a COMMIT for the transaction. Translating all the transaction log files in a directory using -m ensures that all of your transactions are translated.

  1. Run the Log Translation utility (dbtran) against the directory containing the transaction log files and output the resulting SQL statements into a .sql file.

  2. Start the backup copy of your database.

  3. Apply the .sql file generated by dbtran in step 1 to the backup copy of your database from Interactive SQL.

 See also