Shrink LDF file in SQL SERVER 2005

I recently encountered an issue on one of our development box, where SQL log files on C:\ and transaction logs grew to 13GB, on the other hand the DB size is just 29 MB.

Used following SQL query to reduce the size of log file to free up the space

ALTER DATABASE [DBNAME]
SET RECOVERY SIMPLE;
GO
--Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE ([DBNAME_LOGFILE_NAME], 1);
GO
--Reset the database
ALTER DATABASE [DBNAME]
SET RECOVERY FULL;
GO

Comments

Popular posts from this blog

WCF WSDL location address Issue resolved when hosted over HTTPS with basicHTTPBinding

Yellow Background issue in Word to PDF conversion

Gmail tricks - create unlimited siblings of your Gmail address