Shrinking a SQL Server log file (.ldf)

I’ve been working quite a bit recently with a database that I have been constantly deleting from and re-adding data for testing an uploader. The uploader carries out hundreds of SQL statements and as such it has resulted in a rather large log file, which over time would get to the unmanageable size.

So I had a quick look for ways to reduce the log file size when I want to… In the end it’s simple Smile

DBCC SHRINKDATABASE(<database name>)

Simply put in the name of the database and execute it.

Tagged . Bookmark the permalink.

Leave a Reply