Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

How to create a transaction log backup (Transact-SQL)

SQL Server 2000

How to create a transaction log backup (Transact-SQL)

To create a transaction log backup

  1. Execute the BACKUP LOG statement to back up the transaction log, specifying:
    • The name of the database to which the transaction log to back up belongs.

    • The backup device where the transaction log backup will be written.
  2. Optionally, specify:
    • The INIT clause to overwrite the backup media, and write the backup as the first file on the backup media. If no existing media header exists, one is automatically written.

    • The SKIP and INIT clauses to overwrite the backup media even if there are either backups on the backup media that have not yet expired, or the media name does not match the name on the backup media.

    • The FORMAT clause, when using media for the first time, to completely initialize the backup media and rewrite any existing media header.

      The INIT clause is not required if the FORMAT clause is specified.

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 creates a transaction log backup for the MyNwind database to the previously created named backup device, MyNwind_log1:

BACKUP LOG MyNwind
   TO MyNwind_log1
GO

See Also

BACKUP

Transaction Log Backups

Restoring a Database to a Prior State

Reducing Recovery Times

File and Filegroup Backup and Restore

Show:
© 2015 Microsoft