Journal Calendar
<dec 2005>
SMTWTFS
    123
45678910
11121314151617
18 192021222324
25262728293031
       

Page Published [19-DEC-2005]

Truncating and Shrinking a SQL Server logfile

It's such a pain when a SQL Server log file runs away with it's self on a development machine. I always forget the T-SQL to truncate and shrink the log file, so I thought I'd post it here for future reference.

BACKUP LOG <database name> WITH TRUNCATE_ONLY

DBCC SHRINKFILE ('<datbase file minus extension>',1)

Journal Entry Posted @ 13:48 GMT


Journal Index