SQL Server – Truncate transaction log

The transaction log is truncated when a transaction log backup is executed (recovery mode Full).

In an emergency situation, if the log becomes full and it is not possible to backup the log normally, it can be pseudo-backed-up to a fictitious location.

Use at your own risk and only do this if you know what you’re doing.

This will prevent the possibilty of point-in-time recovery, so a full backup should be done after this operation

BACKUP LOG <db name> TO DISK='NUL:'

Leave a Reply

Your email address will not be published. Required fields are marked *