Created
April 19, 2013 03:02
-
-
Save ccjeng/5417820 to your computer and use it in GitHub Desktop.
SQL server - Purge transaction log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE DatabaseName | |
GO | |
DBCC SHRINKFILE(<TransactionLogName>, 1) | |
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY | |
DBCC SHRINKFILE(<TransactionLogName>, 1) | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment