magritton
12/11/2014 - 8:41 PM

This SQL statement reduces the size of the log file down to 10MB

This SQL statement reduces the size of the log file down to 10MB

USE opwbi;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE opwbi
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (opwbi_Log, 10);
GO
-- Reset the database recovery model.
ALTER DATABASE opwbi
SET RECOVERY FULL;
GO