locked
WSS_Content Still 6 Gb Large RRS feed

  • Question

  • I inadvertently deleted my default SharePoint site for which I had no backup to restore from.

    A review of the SQL tables shows everything gone.

    Then why is my WSS_Content database still over 6 gb large?

    I don't want to shrink the db if there's the slightest possibility that something is recoverable.

    Thanks for any assistance you can provide.


    Ross

    Tuesday, December 18, 2012 3:24 PM

Answers

  • What you're probably seeing with the 6GB data file is looking directly at the .mdf on the file system.

    SQL databases like to use something called "white space", in other words this is empty space in the database that SQL still reserves on the file system, think of it like a reservation at a resturaunt, you may reserve a table for 14 guests, but only 8 show up, you still have 14 table settings to use as people come and go.  Or when the resturaunt needs the space the can "shrink" your table for 14 down to only 8 settings and free up a table for another guest (which would be the DBCC SHRINKFILE command).

    Here's a pretty good write up on how to determine exactly how much space in your .mdf file is white space: http://www.mssqltips.com/sqlservertip/1805/different-ways-to-determine-free-space-for-sql-server-databases-and-database-files/

    In general, I like to have about 20% whitespace in my WSS_Content databases, and will sometimes manually grow them in order to maintain the ratio since fiel growth is such a performance hit.

    As for recovering your data from the .mdf - maybe if you had turned off the farm right after the delete there might be some tools out there to allow you to do a low level recovery from the disk, but if it's still online and you've been using the content database it's probably written over the disk sectors several times now, so not likely, or might be quite expensive and if the recovery isn't good the .mdf would be suspect at best.

    As a very religious friend of mine once said, you may code like the devil, but remember Jesus always saves... gotta set up backups as part of the first thing you do brinigng up a farm...


    ieDaddy
    Blog: http://iedaddy.com
    Twit: @iedaddy

    Tuesday, December 18, 2012 4:02 PM

All replies

  • You know, I probably posted this in the wrong forum since this is a WSS 3.0 SharePoint Services.

    Let me know if I should go somewhere else.

    Thanks.


    Ross

    Tuesday, December 18, 2012 3:26 PM
  • Nevermind.  It's hopeless.

    Ross

    Tuesday, December 18, 2012 3:58 PM
  • What you're probably seeing with the 6GB data file is looking directly at the .mdf on the file system.

    SQL databases like to use something called "white space", in other words this is empty space in the database that SQL still reserves on the file system, think of it like a reservation at a resturaunt, you may reserve a table for 14 guests, but only 8 show up, you still have 14 table settings to use as people come and go.  Or when the resturaunt needs the space the can "shrink" your table for 14 down to only 8 settings and free up a table for another guest (which would be the DBCC SHRINKFILE command).

    Here's a pretty good write up on how to determine exactly how much space in your .mdf file is white space: http://www.mssqltips.com/sqlservertip/1805/different-ways-to-determine-free-space-for-sql-server-databases-and-database-files/

    In general, I like to have about 20% whitespace in my WSS_Content databases, and will sometimes manually grow them in order to maintain the ratio since fiel growth is such a performance hit.

    As for recovering your data from the .mdf - maybe if you had turned off the farm right after the delete there might be some tools out there to allow you to do a low level recovery from the disk, but if it's still online and you've been using the content database it's probably written over the disk sectors several times now, so not likely, or might be quite expensive and if the recovery isn't good the .mdf would be suspect at best.

    As a very religious friend of mine once said, you may code like the devil, but remember Jesus always saves... gotta set up backups as part of the first thing you do brinigng up a farm...


    ieDaddy
    Blog: http://iedaddy.com
    Twit: @iedaddy

    Tuesday, December 18, 2012 4:02 PM