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

SQL Anywhere 11.0.0 » SQL Anywhere Server - Database Administration » Maintaining Your Database » Backup and data recovery » Backup and recovery tasks

 

Making a backup, deleting the original transaction log

If your database is not involved in replication, and if you have limited disk space on your online computer, you can delete the contents of the online transaction log (truncate the log) when you make a backup. In this case, you need to use every backup copy made since the last full backup during recovery from media failure on the database file.

For more information about when to use this type of backup, see A backup scheme for databases not involved in replication.

To make a backup, deleting the transaction log (Sybase Central)

  1. Connect to the database as a user with DBA authority.

  2. Right-click the database and choose Create Backup Images.

  3. Click Next.

  4. In the Which Database Do You Want To Back Up list, select the database and click Next.

  5. In the Save The Backup Images In The Following Directory field, type the name of a directory to save the backup copies.

  6. Select an option in the Which Files Do You Want To Back Up list and click Next.

  7. In the What Do You Want To Do With The Transaction Log list, click Truncate The Transaction Log.

  8. Click Next.

  9. Click Finish.

  10. Click Close.

To make a backup, deleting the transaction log (SQL)

  • Use the BACKUP statement with the following clauses:

    BACKUP DATABASE
    DIRECTORY backup-directory
    [ TRANSACTION LOG ONLY ]
    TRANSACTION LOG TRUNCATE;

    Include the TRANSACTION LOG ONLY clause 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 enter a path, it is relative to the working directory of the database server, not your client application.

To make a backup, deleting the transaction log (Command line)

  • Run the following command:

    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 enter a path, it is relative to the directory from which you run the command.

Notes

Before the online transaction log can be erased, all outstanding transactions must complete. If there are outstanding transactions, your backup cannot complete. See Backup internals.

You can determine which connection has an outstanding transaction using the sa_conn_info system procedure. If necessary, you can disconnect the user with a DROP CONNECTION statement. See Determining which connection has an outstanding transaction.

See also