Shrink Sharepoint SQL log files
Posted: Tuesday, 8 November 2011 by Khalid Ameerodien in Labels: General Admin
0
I had noticed on our production and dev boxes that the log files were growing exessively. The database log files were backed up every day so I thought I would go ahead and shrink the log files. I used the following script to do this
use Databasename
GO
Alter database Databasename set recovery simple
GO
Alter Database Databasename set recovery Full
GO
dbcc shrinkfile (Databasename_log, 1000)
GO
The 1000 in the second last line indicates the size you wish to shrink the log file to.