2010-07-13

Shrinking Microsoft SQL Server Log file

It works, trust me. And when I say me, I mean Microsoft :).

SQL Server 2005:
BACKUP LOG MyDatabase WITH TRUNCATE_ONLY
DBCC SHRINKFILE(MyDatabase_log, 2000)

SQL Server 2008:
ALTER DATABASE MyDatabase SET RECOVERY SIMPLE
GO
DBCC Shrinkfile(MyDatabase_log, 2000) 
Post a Comment