SharePoint 2010 Configuration Database has a huge LOG File size problem.

You detected that SharePoint 2010 configuration database has a big LOG file size and you have  a low disk space problem.

This is happening because SharePoint Configuration Database are set to full recovery mode by default. Full recovery mode does not auto shrink / truncate the log files on a full backup. In this mode System Admins are responsible to maintaining getting Transactional Log Backups and Shrinking Log files. If Simple recovery mode is selected when you get a full backup the log files will be shrinked. But Microsoft does not recommend changing to simple recovery mode in a production environment.

You can check the Recovery mode by using SQL Server Management Studio (SSMS) by selecting “SharePoint Config” database (Right Click)-> Properties -> Options.

Full recovery mode allows the SQL admins to backup the transcation logs incrementally, simple recovery mode does not allow this and only allows full or differential backups, no transaction log backups. And Full Recorvery mode has provide you to recovery at specific time manner.

For more information about SQL Server Recovery Models
http://msdn.microsoft.com/en-us/library/ms189275.aspx

SharePoint Configuration Database is the heart of a SharePoint farm and according to size of farm lots of transactions happens.Especially every Timer Job run can cause high transactions on SharePoint Configuration Database. And There are nothing to prevent or reduce this logs rate by making any changes on SharePoint Side.

So for production enviroments SQL Admin should make a recovery and maintenance plans for preventing unnecessary growth of log files. It should be done by getting frequently Transactional Log backups and shrinking transaction log files.

The frequency has changed  system by system. It could be done 30 min to 1 day frequency, according to your transaction log growth.To prevent this kind of problem, make automize or manuelly get your Transactional backups and shrink the log files for a defined period.

For Backup Transaction Log Please check fallowing artcile:
http://msdn.microsoft.com/en-us/library/ms179478.aspx

For Shrink Transaction Log file:
http://msdn.microsoft.com/en-us/library/ms190757.aspx

How to enable verbose log mode on Moss 2007

First Method: Using Central Administration

1) Open your Central Administration web page and Click “Operations”
2) Click Diagnostic Logging link

3) For enabling verbose mode for all categories:
Select and set “Select a Category” combobox value to “All
Select and set “Least critical event to report to the event log” combobox value to “Warning
Select and set “Least critical event to report to the trace log” combobox value to “Verbose

4) Click OK.Its done.
Important!:Please don’t forget change mode to default after collecting needed verbose mode logging. Because in verbose mode log files grows rapidly and if you are not enough storage your sharepoint server would be crashed

Important!:Before enabling verbose mode ensure you have enough hdd space on ALL your servers. Because this is a farm configuration and all servers has been affected by this change.

For restoring default values.
Select and set “Select a Category” combobox value to “All
Select and set “Least critical event to report to the event log” combobox value to “Error
Select and set “Least critical event to report to the trace log” combobox value to “Medium
and click OK button.


Second Method: Using stsadm command

1) Open a command prompt
2) Redirect to path drive:\Program Files\Common Files\Microsoft Shared\Web Server Extentions\12\Bin
3) Be sure that you have enough hardisk space for collecting verbose mode logging.
4) Run stsadm command:

Syntax
stsadm.exe -o setlogginglevel
[-category < [CategoryName | Manager:CategoryName [;…]] >]
{-default |
-tracelevel < trace level setting>
[-windowslogginglevel] <Windows event log level setting>}

For set all categories to verbose use this command:
exp:
stsadm -o setlogginglevel  -tracelevel verbose -windowslogginglevel warning

For set all logs level to default use this command:
exp:
stsadm -o setlogginglevel -default

Important!:Please don’t forget change mode to default after collecting needed verbose mode logging. Because in verbose mode log files grows rapidly and if you are not enough storage your sharepoint server would be crashed.

If you want to learn current logging level run bellowed command:
Exp:
stsadm.exe -o listlogginglevels

for more information.
http://technet.microsoft.com/en-us/library/cc261740(office.12).aspx

You can find Sharepoint logs in folder: (Default folder)
Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extentions\12\LOGS
NOTE: If you need to transfer these files to Microsoft File Services , please compress files in zip file. If zip file size is bigger than  5GB please spearate multiple files that lower than 5GB.

Hhave nice day …