Source: http://www.cnblogs.com/nbpowerboy/p/3380079.html
The company has been using SharePoint 2010 for more than three years, and the BPM project also has more than 2 years, before the vendor's deployment of the SharePoint database is on a physical disk, the database files and log files are not separately stored on different physical disks, Recently found that the database disk of SharePoint is often full, resulting in the inability to save data, the check found that all the data disk log files accounted for more than 800 g, the total disk space is 0.99T, that is, the log file is much larger than the data file, so need to shrink the log file, The first way to take advantage of a graphical shrink file is to shrink the size of the data file, which does not work for the log file:
this way only the database transaction is functional in simple mode , if the full mode does not play any role, that is, to shrink the log file, check the database transaction mode, you can pass the following SQL statement:
From sys.databases
The check found that the SharePoint state database log file is large and 78G, so reduce the state database log file to 500M, as follows:
SET Recovery Simplegouse stateservice_fe3a026d155a4852b906c8f3735cdcd3goDBCC shrinkfile ( Stateservice_fe3a026d155a4852b906c8f3735cdcd3_log,$)go
the effect of the final implementation, such as:
How to clean up the SQL Server R2 log database for SharePoint 2010!