Transactional Log Shrink Conditions in SQL Server

 The Purposes of this condition is Shrink truncated log file in SQL server database.
 
 ALTER
 DATABASE [Test] 
 SET
 RECOVERY SIMPLE; 
 GO
 
 -- Shrink the truncated log file to 1 MB. 
 

 DBCC
 SHRINKFILE (Test_log, 1); 
 GO
 
 -- Reset the database recovery model. 
 

 ALTER
 DATABASE [Test] 
 SET
 RECOVERY FULL;
X

Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now