Alert This post is over a year old, some of this information may be out of date.

Quiescing a SharePoint 2010 Farm as in SharePoint 2007

In SharePoint 2007 you had the ability to quiesce the farm inside central administration. This ability is not implemented in SharePoint 2010, you need to use the STSADM command to achieve this.

1
stsadm -o quiescefarm -maxduration minutes

But, I have done some research and development to achieve the same as in SharePoint 2007. In this blog post I will explain you how you can quiesce your farm by code, and I deliver you my SharePoint 2010 Solution file that makes the same functionality as in SharePoint 2007 available.

QuiesceFarm Solution

Programming

To be able to start writing some code to quiesce your farm, you need to add the following reference to your project: “Microsoft.Office.Server.Administration”.

The next step is to retrieve your farm “SessionStateService”. This service allows you to quiesce the farm.

Show image Session State Service
Session State Service
1
SessionStateService sessionStateService = SPFarm.Local.Services.GetValue();

Now the only thing we need is to write some code to quiesce the farm and to stop the quiescing.

The code for quiescing the farm, looks like this:

1
2
sessionStateService.Quiesce(new TimeSpan(0, 0, 10));
sessionStateService.Update();

The code to stop the quiescing of the farm, looks like this:

1
2
sessionStateService.Unquiesce();
sessionStateService.Update();

SharePoint 2010 Quiesce Solution

The solution that I have created enables you to quiesce the SharePoint 2010 farm through central administration. This solution is based on the SharePoint 2007 version.

  • Add and deploy the estruyf.QuiesceFarm solution to your farm;
  • Go to Central Administration -> Site Actions -> Site Settings;
  • Open the **Manage site features **page;
  • Activate: E. Struyf Quiesce Farm Feature;
  • Navigate to System Settings;
  • Under Farm Management, the Quiesce Farm option should be available.
Show image Quiesce Farm Option
Quiesce Farm Option

Result

When the SharePoint farm is not quiesced, you receive the following screen.

Show image Quiesce Normal State
Quiesce Normal State

When you quiesce the farm you will get the following results.

Show image Farm in Quiescing state
Farm in Quiescing state
Show image Farm Quiesced
Farm Quiesced

Download

QuiesceFarm Solution

VS2010 Project

Comments

Back to top