How to create a backup of the currently active transaction log (Transact-SQL)

To create a backup of the currently active transaction log


Important The transaction log should not be backed up:


  1. Execute the BACKUP LOG statement to back up the currently active transaction log, specifying:
  2. Optionally, specify:

Important Use extreme caution when using the FORMAT or INIT clauses of the BACKUP statement as this will destroy any backups previously stored on the backup media.


Examples

This example backs up the currently active transaction log for the MyNwind database even though MyNwind has been damaged and is inaccessible. The transaction log, however, is undamaged and accessible.

BACKUP LOG MyNwind

    TO MyNwind_log1

    WITH NO_TRUNCATE

GO

  

See Also
BACKUP Creating and Applying Transaction Log Backups
Restoring a Database to a Prior State Using Differential Database Backups with Transaction Log Backups
Creating File or Filegroup Backups  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.