MsSQLWindows Server

MSSQL: Clear MSSQL Log

This guide will help you how to clear MSSQL log that filling up to customer’s database server. First, make sure you able to login to MSSQL database as administrator / sa privilege via MSSQL Management Studio.

Choose database name that need to be clear the logs. And create new executed SQL query as below.

ALTER DATABASE database_name SET RECOVERY simple
use database_name
DBCC SHRINKFILE(database_name_log,100)
ALTER DATABASE database_name SET RECOVERY FULL

Where database_name should be refer to customer’s actual database. After that execute query and you’re done.

Leave a Reply

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