다음을 통해 공유


Setting-up SharePoint 2010 stretched farm

Some enterprises have data centers that are located close to one another with high-bandwidth connections so that they can configure SHarePoint 2010 as a single farm to achieve high-availability as well as low RTO/RPO,we call it as a "stretched" farm. For a stretched farm to work, there must be less than 1 millisecond latency between SQL Server and the front-end Web servers in one direction, and at least 1 gigabit per second bandwidth.

In this scenario, you can provide fault tolerance by following the standard guidance for making databases and service applications redundant.

The following post guides you on how to setup stretched farm. I will post additional topics related to stretch farm such as search failover.

The following post is based on the following configuration:

Primary Site

WFE Server

APP Server

SQL

Services Running

SP2010

 

 

  • Access
  • Application Discovery and Load Balancer
  • Enterprise Search (Query)
  • Excel Services
  • PowerPoint
  • Security Token Service
  • Visio Graphics
  • Web Analytics
  • Word Viewing

 

SP2010APP1

 

  • Application Discovery & Load Balancer
  • Business Data Connectivity Services
  • Enterprise Search (Crawl)
  • Managed Metadata
  • PerformancePoint
  • Secure Store Service
  • Security Token
  • User Profiles
  • Word Automation

 

 

 

DCSQL

  • Database Server

Secondary - Stretched Site

WFE Server

APP Server

SQL

Services Running

DRSQLSP2010

 

 

  • Access
  • Application Discovery and Load Balancer
  • Enterprise Search (Query)
  • Excel Services
  • PowerPoint
  • Security Token Service
  • Visio Graphics
  • Web Analytics
  • Word Viewing

 

DRSP2010APP1

 

  • Application Discovery & Load Balancer
  • Business Data Connectivity Services
  • Enterprise Search (Crawl)
  • Managed Metadata
  • PerformancePoint
  • Secure Store Service
  • Security Token
  • User Profiles
  • Word Automation

 

 

 

DRSQLSP2010

  • Database Server

  • Web Applications that we currently have

 

  • In order to have stretched farm, the databases need to be mirrored. So, we're going to setup synchronous mirroring. In order to setup stretched farm, we need to get the list of databases used by SharePoint 2010 Get-SPDatabase cmdlet from SharePoint Powershell

Get-SPDatabase | select Name |Format-List > C:\Script\dblist.txt

Here's the result

Name : UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0

Name : SharePoint_Config_2010

Name : Search_Service_Application_SharePointServer_CrawlStoreDB_8e9425630542404

       cb93dd470bdb85d82

Name : Search_Service_Application_SharePointServer_PropertyStoreDB_c12560cf7322

       4e3bb563e3424ce51bce

Name : SharePoint_Admin_Content_2010

Name : WSS_Content_2010

Name : WSS_Content_My_2010

Name : WSS_Content_mysites_2010

Name : WSS_Content_sp2010

Name : WSS_Content_STPLab2010

Name : WSS_Content_Temp

Name : Search_Service_Application_SharePointServer_DB_b4c715175e0c4827b7b324c02afd7f96

Name : UM_MMS

Name : SharedServices_2010

Name : WSS_UsageApplication

Name : UserProfileUM_SyncDB_a5502148-ca0a-4dbc-acfe-8d1f1717c843

  • Set-up the databases to full-recovery mode for those databases except the logging database/WSS_UsageApplication

USE [master]

GO

ALTER DATABASE [UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0] SET RECOVERY FULL WITH NO_WAIT

GO

ALTER DATABASE [SharePoint_Config_2010] SET RECOVERY FULL WITH NO_WAIT

GO

ALTER DATABASE [Search_Service_Application_SharePointServer_CrawlStoreDB_8e9425630542404cb93dd470bdb85d82] SET RECOVERY FULL WITH NO_WAIT

GO

....

  • Back-up the database and the transaction log

USE [master]

GO

BACKUP DATABASE [UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0]

    TO DISK = 'C:\DBBackup\UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0.bak'

GO

BACKUP LOG [UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0]

    TO DISK = 'C:\DBBackup\UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0.trn'

GO

 

BACKUP DATABASE [SharePoint_Config_2010]

    TO DISK = 'C:\DBBackup\SharePoint_Config_2010.bak'

GO

BACKUP LOG [SharePoint_Config_2010]

    TO DISK = 'C:\DBBackup\SharePoint_Config_2010.trn'

GO

.......

  • Copying the backup files to the mirror SQL Server location
  • Restore the database and the transaction log on the secondary site/stretched site SQL Server

USE [master]

GO

RESTORE DATABASE [UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0]

    FROM DISK = 'C:\DBBackup\UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0.bak'

        WITH FILE=1, NORECOVERY

GO

RESTORE LOG [UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0]

    FROM DISK = 'C:\DBBackup\UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0.trn'

        WITH FILE=1, NORECOVERY

GO

 

.......

  • Setup SQL Server mirroring with the mirrored partner

Follow the instructions provided on the following link:

How to: Configure a Database Mirroring Session (SQL Server Management Studio)

https://msdn.microsoft.com/en-us/library/ms188712.aspx

Manually setup the SQL Mirroring  

  • We need to add failoverserviceinstace for each sharepoint database involved within the stretched farm. We can do the setting from PowerShell to add the drsqlsp2010.contoso.com into the failoverserver property. By running the following script:

$db = get-spdatabase | where {$_.Name -eq "UserProfileUM_SocialDB_f189d285c9554848a72f73ca9c8e9dc0"}

$db.AddFailoverServiceInstance("DRSQLSP2010")

$db.Update()

 

$db = get-spdatabase | where {$_.Name -eq "SharePoint_Config_2010"}

$db.AddFailoverServiceInstance("DRSQLSP2010")

$db.Update()

 

......

Verify the result.

PS C:\> Get-SPDatabase |select Name,failoverserver

Name FailoverServer

---- --------------

UserProfileUM_SocialDB_f189d285c9554... SPServer Name=DRSQLSP2010

SharePoint_Config_2010 SPServer Name=DRSQLSP2010

Search_Service_Application_SharePoin... SPServer Name=DRSQLSP2010

Search_Service_Application_SharePoin... SPServer Name=DRSQLSP2010

SharePoint_Admin_Content_2010 SPServer Name=DRSQLSP2010

WSS_Content_2010 SPServer Name=DRSQLSP2010

WSS_Content_My_2010 SPServer Name=DRSQLSP2010

WSS_Content_mysites_2010 SPServer Name=DRSQLSP2010

WSS_Content_sp2010 SPServer Name=DRSQLSP2010

WSS_Content_STPLab2010 SPServer Name=DRSQLSP2010

WSS_Content_Temp SPServer Name=DRSQLSP2010

Search_Service_Application_SharePoin... SPServer Name=DRSQLSP2010

UM_MMS SPServer Name=DRSQLSP2010

SharedServices_2010 SPServer Name=DRSQLSP2010

WSS_UsageApplication SPServer Name=DRSQLSP2010

UserProfileUM_SyncDB_a5502148-ca0a-4... SPServer Name=DRSQLSP2010

 

The command above added the failover partner to the connection string used by sharepoint. So, in case the server DCSQL failed, the server will try to connect to DRSQLSP2010. We can see from the information put in the registry on each of the sharepoint server.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\Secure\ConfigDB]

"dsn"="Data Source=dcsql;Failover Partner=DRSQLSP2010;Initial Catalog=SharePoint_Config_2010;Integrated Security=True;Enlist=False;Connect Timeout=15"

  • We simulated to change the principal to DRSQLSP2010 to see whether SharePoint can automatically failover to the specified server or not. In the real environment, you'll need to make sure that you can get the SQL server on the stretched site to be able to recover from broken SQL mirroring as well as be able to get database get-up and running normally.

 

And we've got the mirrored server as the principal now

  • Once we did the failover to the mirror, we can see the following entries on the ULS log, saying that the SQL Server failover connection detected.

w3wp.exe (0x0FCC) 0x01C0 SharePoint Server Database tzkm Medium SQL Server failover connection detected. SQL Server dcsql failing over to SQL server DRSQLSP2010.     

  • Verifying the feature do work after failover such as Search, MMS, user profile, and other services as necessary

That's the setup that we need to go through to setup stretched farm. In the next post, I'll explore in more detail related to SharePoint components failover in disaster recovery condition.

Comments

  • Anonymous
    January 01, 2003
    Hi Santosh, Please find my responses
  1. you can always run multiple Central Administration web sites to different sharepoint servers within a sharepoint farm. You can do this in two ways: a) PSCOnfig -cmd adminvs (technet.microsoft.com/.../cc263093.aspx) b)Powershell : New-SPCentralAdministration (technet.microsoft.com/.../ff607841.aspx)
  2. For the the service application itself, you can have one configured within your farm. and the service instances (Hope you understand difference between service application and service instance, here's for more information about this: ), In my opinion you should keep the services on DC2 started as what you have on DC1, so that when we've got unexpected failure, they will automatically run. But, if you'd like to keep the services on DC2 to be in stopped state for some reasons, that should be fine too but you'll need to figure it out how you're going to bring the services started on DC2 when failure comes. HTH
  • Anonymous
    January 01, 2003
    Santosh, That will provision a central administration site in your server. This will only provision administration interface, whilst the content of the configurations/service application will remain the same with the first one that is provisioned as part of sharepoint installation.

  • Anonymous
    September 08, 2011
    Thanks berryst, nice Articles with details steps abt  Strech Farm concept  for SharePoint. I have followling Queries.

  1. can I create multiple Central admin site using diffrent port i.e  Central Admin site at DC1 at Port 8080 other Cental admin site at DC2 at port 8081 so that is DC1 down then Administrator can access CA from DC2 server , or any other things i need to do.
  2. What abt the services application is same sevicess Applicaitons i need to configure on DC2 Application server which is configured on DC1  Application server or only once i need to configure services. pls clarify. Thanks for your time Santosh K.
  • Anonymous
    September 15, 2011
    Thanks Berryst, for your valuable input. well the above comand will create new SP central admin or use existing one? if new one then do i have to configure exryting for services application which I configured in DR1 Application server Thanks.

  • Anonymous
    November 01, 2011
    Berryst, Thanks for a wonderful overview, it has helped allot... I'm in the proces of building a cross farm service enviorment, I would like to build in HA for the service applications MMS, UPA, Web Ana, Secure Store and Search... While I understand how to build in some HA into search service, I'm not sure how to build it into the other four can you point me to guides or examples on how to get the services into a HA Thank in advance Gerald

  • Anonymous
    December 02, 2011
    The comment has been removed