Wednesday, March 07, 2018

Handling unused site collection in SharePoint

On the Information capacity plan and its management in SharePoint, finding the inactive site collection and archiving it for future reference or disposing the site collection.

You can create the site policy to dispose the site collection, in site policy you can specify the duration, beyond this duration you can notify the administrator of the site collection for the next steps to be taken on it. You may set the read only or deleting the same.

Inactive site (unused) occupies the considerable storage space in the database and often leads to exceeding DB size and eventually performance issue on your server.

For better organize you can separate the site collection in to separate content database.

Apart from Site Policy on identifying the unused site collection, you can also use the SPSite class properties LastContentModifiedDate and LastSecurityModifiedDate.

         Using (SPSite site = new SPSite (SPContext.Current.Site.Url))
            {
                DateTime lastContentModified = site.LastContentModifiedDate;
                DateTime lastSecurityModified = site.LastSecurityModifiedDate;

            }