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 - Database Administration » Database maintenance » Backup and data recovery » Backups for databases involved in synchronization and replication » Transaction log management

 

Renaming or truncating the transaction log (command line)

If your database is involved in synchronization or replication, rename the transaction log to create a new transaction log for the database. If your database is not involved in replication and you have limited disk space on your computer, truncate the transaction log.

Prérequis

You must have BACKUP DATABASE system privilege.

Contexte et remarques

If your database is involved in synchronization or replication, it is good practice to maintain copies of old transaction logs until you are certain they are no longer needed. Alternatively to renaming the transaction log, you can continue to use the existing transaction log when you back up your database.

If you truncate the transaction log during backup to delete the contents of the online transaction log, to recover your database from media failure on the database file you must use every backup copy made since the last full backup.

 Task
  • Run the following command:

    Option Action
    Rename the transaction log
    dbbackup -c "connection-string" -r [ -t ] backup-directory
    Truncate the transaction log
    dbbackup -c "connection-string" -x [ -t ] backup-directory

    Include the -t option only if you are making an incremental backup.

    The backup copies of the transaction log and database file are placed in backup-directory. If you specify a path, it is relative to the directory from which you run the command.

Résultat

A backup is made and the transaction log is renamed or truncated.

 See also