CLear MSSQL DB log file without backing it up

This is one that has come in hand a few times, if you’ve accidentaly filled up you data drive on your SQL server and don’t have the space left to clear out the log file and reclaim the space just run the following command then shrink the DB.

BACKUP LOG "MyDatabaseName" WITH TRUNCATE_ONLY

Leave a Reply

Your email address will not be published.