none
Deleting Orphan Sites and Releasing Site collection Size from Content Database RRS feed

  • Question

  • Scenario:

    We have attached Database to Web application which has Duplicate site collections and Later Delete orphan Sites using below command

    stsadm -o deletesite -force -SiteID ********************* -DatebaseName ContentDB_**** -DatabaseServer ****

    Orphan site has been removed/not associated with Sharepiont  but it's NOT releasing consumed Size(150 GB) from Database.

    Please help us to how to release Site collection Size from Database other than below Option.

    Take Site collections backup which are in use from Database and Delete Database.

    Create Site collection and restore from above backup-ed site collection.

    Thanks for your Help in Advance!


    -Naveen

    Tuesday, February 6, 2018 2:49 PM

Answers

  • When you delete information from a SQL database, regardless of application, that whitespace is not freed up on the disk itself. Instead, you must shrink the SQL database (using SSMS, sqlcmd, etc.) on the SQL Server.

    This can severely impact performance. You should consider leaving some whitespace behind as well so as people add content back to the database it does not have to perform grow operations. In addition, shrinking destroys the indexes. You should reindex your database post-shrink.


    Trevor Seward

    Office Servers and Services MVP



    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Tuesday, February 6, 2018 4:20 PM
    Moderator

All replies

  • Hi Naveen.

    You can get a list of the deleted site collections that are still present in a SharePoint content database using the Get-SPDeletedSite cmdlet; then you'll use the Remove-SPDeletedSite cmdlet to definitively remove each of them.

    Bye.


    Luigi Bruno
    MCP, MCTS, MOS, MTA

    Tuesday, February 6, 2018 4:08 PM
  • When you delete information from a SQL database, regardless of application, that whitespace is not freed up on the disk itself. Instead, you must shrink the SQL database (using SSMS, sqlcmd, etc.) on the SQL Server.

    This can severely impact performance. You should consider leaving some whitespace behind as well so as people add content back to the database it does not have to perform grow operations. In addition, shrinking destroys the indexes. You should reindex your database post-shrink.


    Trevor Seward

    Office Servers and Services MVP



    Author, Deploying SharePoint 2016

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    Tuesday, February 6, 2018 4:20 PM
    Moderator
  • Hi Naveen,

    If you think the suggestion provided by Luigi Bruno and Trevor Seward are helpful, you could mark the replies as answers. It will help others who meet the similar question in this forum.

    Best regards,

    Allen Bai



    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.


    Wednesday, February 7, 2018 8:31 AM
  • Thanks Trevor Seward!!!!, it's worked.

    After Shirking Database, Site collection size has been released from Database .


    -Naveen

    Friday, February 9, 2018 9:42 AM