Sunday, October 30, 2011

Reduce Sharepoint Services 3.0 log.ldf files

q: our SharePoint services 3.0 log.ldf file is enourmous
a: using a post we found from Luka Manojlovic - just follow their steps:
  1. You can solve this problem by using “Shrink” command in the MS SQL Server Management Studio Express 
  2. First you need to connect to your Sharepoint 3.0 database called: \\.\pipe\mssql$microsoft##ssee\sql\query - just put this string in your “Server name” field: 
  3. \\.\pipe\mssql$microsoft##ssee\sql\query 
  4. Create full backup of all databases before continuing! 
  5. After that we should change restore mode from “Full” (this the parameter that allows .log.ldf to grow that large as transaction logs are not purged) to “Simple”:Expand Databases, right mouse click on Sharepoint_Config… Properties, Options, Recovery model: Simple and click OK
  6. Shrink the database procedure: Expand Databases, right mouse click on Sharepoint_Config… Tasks, Shrink, Files in File type select Log and click OK