Saturday, 19 January 2013

Configuring Failover Database in SharePoint 2010

Amongst the various new features introduced in SharePoint 2010, Fail over database is a one. SharePoint 2010 is mirroring aware. This means that their is high availability of database if you have done the database mirroring at SQL level and have set the failover instance for your database at SharePoint level.

In simple terms, it means that if the connection to the primary database fails then it will automatically try to connect to the failover database instance and thereby ensuring high availability and minimal downtime.

You will have to configure the database mirroring first before proceeding with the failover database configuration. Once you have configured database mirroring at SQL level, there are two ways in which you can configure the fail over database , using Central Administration or by Powershell. But the powershell approach is more efficient as it gives you the ability to create a failover instance for config DB as well.

I will be discussing with both the approaches here.

Powershell Approach

$database = Get-SPDatabase | where { $_.Name -eq "SharePointDBName" }

The Get-SPDatabase​ returns all the databases and by applying where { $_.Name -eq "SharePointDBName" }​ , you can specify which database you want to retrieve.

Once you have retrieved the database instance, you add the Failover server instance to the database and update it. This will add the failover database to your sharepoint content database.

Central Admin 

In central admin, in your manage content databases settings as well there is an option to provide the fail over database. But powershell is a recommended approach as it gives you more flexibility.

In this way you can configure a failover database in SharePoint 2010. :)

Happy Reading !


No comments:

Post a Comment