A quarter of my precious SSD disk space on my dev laptop was in database log files, the *.ldf files in C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA.
Since I'm not a Sql Server expert, I googled and stackoverflowed and patched together the minimum statement I needed to rid me of these tenacious ldf files.
Do not use these on production machines. Use only on development boxes where you are testing and really don't care about the database. This statement took the log size of my typical database from 15Gig to 30K.
DBCC SHRINKDATABASE ([MyDatabaseName], 10, TRUNCATEONLY)
1 comment:
Great Post.It reduced my ldf file size to 1 GB from 79 GB. Thanks a lot
Post a Comment