Skip to main content


 

Symptoms


We are currently running out of space on a development machine. The K2SmartBroker_log.LDF is 3.5GB.... Could you please provide us a SQL script that can clean this file up for us so we can have some space back to continue developing.
 

Diagnoses


The LDF file was continuing to grow to an impractical size and needed to be truncated.
 

Resolution

The customer discovered that the following SQL code brought the file back down to a manageable size:

USE SK2SmartBroker]
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE K2SmartBroker
SET RECOVERY SIMPLE
GO
-- Shrink the truncated log file to 50 MB.
DBCC SHRINKFILE (K2SmartBroker_Log, 50)
GO




 
Be the first to reply!

Reply