Wednesday, November 9, 2011

Truncate SQL (SharePoint) Log File

I happened upon a SharePoint server that needed some attention - the Config DB log file was 17GB. Shrunk as follows:

DBCC SHRINKFILE('SharePoint_Config_********-****-****-****-************_log', 1)
BACKUP LOG "SharePoint_Config_********-****-****-****-************" WITH TRUNCATE_ONLY
DBCC SHRINKFILE('SharePoint_Config_********-****-****-****-************_log', 1)
GO

(That's on SQL 2005 btw - somewhat deprecated commands)

B

No comments: