USE
GO
DBCC SHRINKFILE(<Logical Name of Transaction Log>, 1)
BACKUP<Database Name> LOG WITH TRUNCATE_ONLY
1 (second parameter of DBCC SHRINKFILE) is target size of file in megabytes.
It won’t take backup of log file. Hence log will be lost. Make sure to take backup if you really want log.
More info:
ReplyDeletehttp://www.beyondweblogs.com/post/SQL-Server-2005-Shrink-and-Truncate-Log-file-size.aspx