Tuesday, June 16, 2009

Shrinking Your SQL Server Log File

Well, did you ever found out that your MS SQL Server transaction log is just too large and its utilization is just too low (lets say 60GB size and only 100MB are used...) and SQL Server just don't let you shrink it?

Well
Andrew Arnott found a great solution to get rid of this wasted space and truncate the log:

backup log [dbname] with truncate_only
go
DBCC SHRINKDATABASE ([dbname], 10, TRUNCATEONLY)
go


Keep Performing
RockeTier 1 Billion Events per Day Development Team

No comments:

Post a Comment