Technology

How to shrink SQL Server Transaction Log file in MS SQL Server 2012

Premanath Kumarage · Author
1 min read
A smartphone and laptop side by side displaying data dashboards

Once the Log File has been truncated, run the below command to put it back the database into full recovery mode using below statement;

On Transact-SQL Window, run the below statement;

ALTER DATABASE MyDatabaseName SET RECOVERY SIMPLE

DBCC SHRINKFILE (MyDatabaseName_Log, 1)

Go

Once the Log File has been truncated, run the below command to put it back the database into full recovery mode using below statement;

ALTER DATABASE MyDatabaseName SET RECOVERY FULL

GO

Written by

Premanath Kumarage

Author

All insights →

Start here

Every piece here started as a client problem. Tell us yours.

A working session, not a sales call. Bring the process your current system fights you on, and we will tell you plainly what it would take to fix it.

Newsletter

One email a month. No filler.

Stay ahead with Microsoft Business Applications.
Insights, implementation advice and practical ideas to help your business get more from Microsoft technology.

By subscribing, you acknowledge MicroCloud 360’s Privacy Policy.