Thursday, September 8, 2011

Microsoft SQL Over growing Log Files

I got a call today from my client that the portal is not working. They post news on News Portal www.nanngronline.com. the portal is built using SharePoint Server 2007 and it has SQL 2005 as the back-end Database.

After about 15 mins trying to resolve the issue I came across a solution on the web. It was the log files that has over grown and has to be clear or shrink. I have to execute this command;

USE
GO
DBCC SHRINKFILE(, 1)
BACKUP LOG WITH TRUNCATE_ONLY
DBCC SHRINKFILE(, 1)
GO

for example;

USE SharePoint_Config
GO
DBCC SHRINKFILE(SharePoint_Config_log, 1)
BACKUP LOG sharePoint_Config WITH TRUNCATE_ONLY
DBCC SHRINKFILE(SharePoint_Config_log, 1)
GO

I hope this will help somebody out in the future

ENJOY

0 comments:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes