Monday, 9 November 2015

Why a Content DataBase is not cleaning the free space after Move-SPSite or Delete-SPSite?

Hi all,

I was faced to a full Database, and the quick-win solution, was to move some sites to another Database.

After making the list of the site collection present in the database, I found that the moved sites were no more present, as expexted.
But on the SQL side, the Database was still full…

I’ve asked our SQL Team to Shrink the Database, but nothing was changed.

Then, I’ve search why the space used by the moved sites was not cleared by the Timer Job.
Timer Job… The Gradual Site Delete timer job.

I’ve found why the Database didn’t change the free space after moving sites.
The timer job in SharePoint wasn’t correctly set.

After checking, the job supposed to be run automatically every day from 10PM to 6AM, but it wasn’t run.


Reason: start time is before end time. Seems that Microsoft logic is … special.

In the drop down list, the time for the timer job (same problem for all timer jobs in all SharePoint versions) start at 12AM and ends at 11PM.

The problem, is that by default, the Gradual Site Delete timer job is set as below: from 10PM to 6AM
This is quite logic for us (human), but I’ve the impression that the timer job doesn’t see the 6AM after 10PM in the drop-down list.
Also, I found that clicking on the “Run Now” button didn’t free the space in the concerned Database.


Thus, this default setting seems not allowing the Timer Job to run:




Solution: instead  of starting at 10PM, I’ve set it to start at 12AM
                                Now, no more red warning message.
                                And clicking on “Run Now” button is directly clearing the free space of all the                                      databases of my Web App.




So, I’ve had to check all my Gradual Site Delete timer job for each Web App I have.
Also, I found this problem to my SharePoint 2010 Farm and my brand new SharePoint 2013 Farms.


Hope this could help.



That’s all Folks


No comments:

Post a Comment