How to shrink your Microsoft Sharepoint Server 2007 log data

Recently we ran a little out of disk space on our Microsoft Small Business Server 2008. With the highly recommended  graphical utility Treesize from Jam Software (free edition) we found out that huge amounts of space were taken by the SQL server log files of the Sharepoint Server (extension LDF). With the help of this great video of Itgroove on Youtube we learned that it can be reduced quite easy.

Assigning ownership to the database

The tutorial in the video works great, but we had the problem  that when a right-click on the database in Microsoft SQL Server Management Studio Express was done to access the properties, an database ownership error popped up (see below).


As can be seen it had to do with the fact that no owner was assigned to the database. This can be solved easily.

  • Right-click on the database in the left panel
  • Select New Query
  • Query: sp_changedbowner @loginame = ‘sa’
  • Press execute (don’t change the user ‘sa’)

Now you can do the right-click again on the database and select properties. From there the instruction of  Itgroove will work.

With this simple tutorial we freed more than 30 Gb of server space

Johan van de Merwe
Dedicated to professional software development since 1985. Has worked since 1992 as IT manager in several international operating companies. Since 2007 CEO and Sencha Ext JS web application developer at Enovision GmbH.

Leave a Reply