43
FINAL V1.1 (RTM) Microsoft Lync Server 2013 Microsoft Lync Server 2013 Lab 12: High Availability and Disaster Recovery Global Technical Readiness Microsoft Confidential - For Internal Use Only 1 FINAL V1.1 (RTM) Released: November 26, 2012

Lync-Server-2013-PSFP_ML12_HADR

Embed Size (px)

DESCRIPTION

book

Citation preview

Global Technical Readiness1

Released:

Lab 12: High Availability and Disaster Recovery

Conditions and Terms of Use

This training package content is proprietary and confidential, and is intended only for users described in the training materials. This content and information is provided to you under a Non-Disclosure Agreement and cannot be distributed. Copying or disclosing all or any portion of the content and/or information included in this package is strictly prohibited.

THE CONTENTS OF THIS PACKAGE ARE FOR INFORMATIONAL AND TRAINING PURPOSES ONLY AND ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

Training package content, including URL and other Internet Web site references, is subject to change without notice. Because Microsoft must respond to changing market conditions, the content should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. Unless otherwise noted, the companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred.

Copyright and Trademarks © Microsoft Corporation. All rights reserved.

Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.

Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.

For more information, see Use of Microsoft Copyrighted Content at http://www.microsoft.com/about/legal/permissions/.

Microsoft®, Internet Explorer, and Windows® are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Microsoft products mentioned herein may be either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. All other trademarks are property of their respective owners.

2 © Microsoft Corporation. All rights reserved.

About the Authors

Author: Greg Anthony

Bio:

Project Member: Ron Solomon

Bio:

Acknowledgements

We want to thank the numerous members of the Product Group, User Assistance Teams, Beta Team, Reskit Team, and Product Quality Team and other supporting teams for their collaboration, time, effort, materials, and presentations that in many important ways has helped to make this project successful.We also want to thank Global Technical Readiness for help with the formatting, presentation creation and other training readiness items and CTS Labs with their help in on boarding the virtual environment in external VMAS.Lastly, I want to thank the CSS Readiness Team for their push, encouragement, and assistance with additional resources to complete this project in a timely manner.

Global Technical Readiness3

Lab 12: High Availability and Disaster Recovery

Table of ContentsLab 12: High Availability and Disaster Recovery..........................................................................................

Exercise 1: Deploying SQL Mirroring for Back End Server High Availability..............................................................

Scenario...............................................................................................................................................................

Exercise 2: Deploy Paired Front End Pool for Disaster Recovery............................................................................13

Exercise 3: Experiencing a Front End Server Failure...............................................................................................18

Exercise 4: Experiencing a SQL Server Failure or outage........................................................................................22

Scenario.............................................................................................................................................................22

Exercise 5: Experiencing a Pool Outage.................................................................................................................31

Scenario.............................................................................................................................................................31

Appendix A: Exercise 1..............................................................................................................................34

4 © Microsoft Corporation. All rights reserved.

Lab 12: High Availability and Disaster RecoveryDuring this lab, you will gain hands-on experience with deploying high availability and disaster recovery and failover of SQL Back End, and the Pool failover/failback.

Estimated time to complete this lab: XX minutes

Before You BeginThis lab depends on the completion of all prior labs.

What You Will LearnAfter completing the exercises, you will be able to:

Deploy high availability topologies.

Failover Back End

Failover/Failback Pool

ScenarioContoso has decided to deploy a high availability topology and implement high availability on their Enterprise Pool SQL Back End.

Exercise 1: Deploying SQL Mirroring for Back End Server High Availability.

In this exercise, you will deploy SQL Mirroring for Back End Server High Availability.

ScenarioContoso has a Lync Server 2013 Enterprise Edition Pool with one SQL Back End. They have deployed a second SQL Server and wish to setup SQL mirroring. They do not plan to use a witness.

TasksAdd SQL mirroring to an existing Front End pool in Topology Builder

To be able to deploy SQL mirroring, your servers must run a minimum of SQL Server 2008 R2. This version must run on all the involved servers: the primary, mirror, and the witness but the witness could be running the SQL Express Edition of SQL Server 2008 R2.

In general, setting up SQL mirroring between the two Back End Servers with a witness requires the following:

The primary server’s version of SQL Server must support SQL mirroring.

Global Technical Readiness5

Lab 12: High Availability and Disaster Recovery

The primary, mirror, and the witness (if deployed) must have the same version of SQL Server.

The primary and the mirror must have the same edition of SQL Server. The witness may have a different edition.

For Lync Server 2013, you can use Topology Builder to deploy SQL mirroring. You simply select an option in Topology Builder to mirror the databases, and Topology Builder sets up the mirroring (including setting up a witness, if you want) when you publish the topology. Note that you set up or remove the witness at the same time you set up or remove the mirror. There is not a separate command to just deploy or remove a witness.

You can either configure the topology for mirroring when you create the pools, or after the pools are already created.

1. On VM L15S1SQL01, create a folder on C:\ named mirrorshare and share it.

2. On VM L15S1FE01, in Topology Builder, under site Corp->Lync Server 2013->Enterprise Edition Front End Pools, right-click pool.contoso.com and then click Edit Properties.

3. Select Enable SQL Store Mirroring, and then click New next to Mirroring SQL Server store.

4. Specify the SQL Server FQDN L15S1SQL02.contoso.com as the store to use as the mirror.

6 © Microsoft Corporation. All rights reserved.

5. Select This SQL instance is in mirroring relation if not already selected and, specify the SQL mirroring port number the default port is 5022, and then click OK.

6. Since we have Archiving and Monitoring configured with SQL Server store. Enable SQL mirroring for both of them also, selecting l15s1sql02.contoso.com\Default previously defined.

7. Click OK.

8. Publish the topology. When you do so, you will be prompted to create the mirror databases but first you must set the file share path.

Global Technical Readiness7

Lab 12: High Availability and Disaster Recovery

9. To enter the file share created in earlier step, highlight the database, then click Settings, enter \\l15s1sql01\mirrorshare, and then click OK.

10. Click Next and complete publishing the topology.

11. Notice that Publishing completes with errors. View the log to determine why it failed.

8 © Microsoft Corporation. All rights reserved.

12. What is the issue? How can you resolve? See Appendix A for tip.

13. After resolving the issue, in Lync Server Management execute the following to complete the failed mirroring configuration.

Install-CsMirrorDatabase -ConfiguredDatabases -FileShare \\l15s1sql01\mirrorshare -SqlServerFqdn l15s1sql01.contoso.com -DropExistingDatabasesOnMirror -Verbose

14. The command executes with output similar to the following.

PS C:\Users\administrator.CONTOSO> Install-CsMirrorDatabase -ConfiguredDatabase -FileShare \\l15s1sql01\mirrorshare -SqlServerFqdn l15s1sql01.contoso.com -DroExistingDatabasesOnMirror -VerboseVERBOSE: Creating new log file"C:\Users\administrator.CONTOSO\AppData\Local\Temp\2\Install-CsMirrorDatabase-3b201f6d-69a2-4926-8926-216b6057197f.xml".

Global Technical Readiness9

Lab 12: High Availability and Disaster Recovery

Install Mirror DatabaseThis cmdlet sets up mirroring for databases on primary SQL Server instance onthe mirror SQL Server instance. If a witness is specified, it also sets up awitness for databases on the primary SQL Server instance.

The following databases will be mirrored and configured with a witness if awitness is specified: Database Name:rtcxds Data File:C:\CsData\BackendStore\(default)\DbPath\rtcxds.mdf Log File:C:\CsData\BackendStore\(default)\LogPath\rtcxds.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Database Name:rtcshared Data File:C:\CsData\BackendStore\(default)\DbPath\rtcshared.mdf Log File:C:\CsData\BackendStore\(default)\LogPath\rtcshared.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Database Name:rtcab Data File:C:\CsData\ABSStore\(default)\DbPath\rtcab.mdf Log File:C:\CsData\ABSStore\(default)\LogPath\rtcab.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Database Name:rgsconfig Data File:C:\CsData\ApplicationStore\(default)\DbPath\rgsconfig.mdf Log File:C:\CsData\ApplicationStore\(default)\LogPath\rgsconfig.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Database Name:rgsdyn Data File:C:\CsData\ApplicationStore\(default)\DbPath\rgsdyn.mdf Log File:C:\CsData\ApplicationStore\(default)\LogPath\rgsdyn.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com

10 © Microsoft Corporation. All rights reserved.

Account: CONTOSO\administrator

Database Name:cpsdyn Data File:C:\CsData\ApplicationStore\(default)\DbPath\cpsdyn.mdf Log File:C:\CsData\ApplicationStore\(default)\LogPath\cpsdyn.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Database Name:lcslog Data File:C:\CsData\ArchivingStore\(default)\DbPath\LcsLog.mdf Log File:C:\CsData\ArchivingStore\(default)\LogPath\LcsLog.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Database Name:lcscdr Data File:C:\CsData\MonitoringStore\(default)\DbPath\LcsCDR.mdf Log File:C:\CsData\MonitoringStore\(default)\LogPath\LcsCDR.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Database Name:qoemetrics Data File:C:\CsData\MonitoringStore\(default)\DbPath\QoEMetrics.mdf Log File:C:\CsData\MonitoringStore\(default)\LogPath\QoEMetrics.ldf Primary SQL: l15s1sql01.contoso.com Account: CONTOSO\administrator Mirror SQL: l15s1sql02.contoso.com Account: CONTOSO\administrator

Verify that the following things are taken care of before proceeding: Port 5022 is accessible through the firewall if Windows Firewall is enabled in the primary SQL Server l15s1sql01.contoso.com. Port 5022 is accessible through the firewall if Windows Firewall is enabled in the mirror SQL Server l15s1sql02.contoso.com. Accounts running the SQL Servers on all primary and mirror SQL servers have read/write permissions to the file share \\l15s1sql01\mirrorshare

Global Technical Readiness11

Lab 12: High Availability and Disaster Recovery

The cmdlet will use WMI provider to find the account information for SQLServer services running on all primary, mirror and witness servers. Verify that WMI provider is running on all these servers.

The cmdlet will try to create folders for data and log files for all themirror servers. Verify that the account running this cmdlet has permission tocreate these folders.[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help(default is "Y"):yVERBOSE: Mirroring was configured successfully for database "rtcxds".VERBOSE: Mirroring was configured successfully for database "rtcshared".VERBOSE: Mirroring was configured successfully for database "rtcab".VERBOSE: Mirroring was configured successfully for database "rgsconfig".VERBOSE: Mirroring was configured successfully for database "rgsdyn".VERBOSE: Mirroring was configured successfully for database "cpsdyn".VERBOSE: Mirroring was configured successfully for database "lcslog".VERBOSE: Mirroring was configured successfully for database "lcscdr".VERBOSE: Mirroring was configured successfully for database "qoemetrics".VERBOSE: Successfully created SQL Server Agent jobs on l15s1sql02.contoso.com.VERBOSE: No changes were made to the Central Management Store.VERBOSE: Creating new log file"C:\Users\administrator.CONTOSO\AppData\Local\Temp\2\Install-CsMirrorDatabase-3b201f6d-69a2-4926-8926-216b6057197f.html".VERBOSE: "Install-CsMirrorDatabase" processing has completed successfully.VERBOSE: Detailed results can be found at"C:\Users\administrator.CONTOSO\AppData\Local\Temp\2\Install-CsMirrorDatabase-3b201f6d-69a2-4926-8926-216b6057197f.html".

You should keep the following in mind when setting up SQL mirroring:

If a mirroring endpoint already exists, it will be reused using the ports defined there, and will ignore the ones you specify in the topology.

Any port already allocated for other applications on the same server, including those for other SQL instances, should not be used for the installed SQL instances at hand. This implies that if you have more than one SQL instance installed on the same server, they must not use the same port for mirroring. For details, see the following articles:

o “Specify a Server Network Address (Database Mirroring)” in the MSDN Library at http://msdn.microsoft.com/en-us/library/ms189921.aspx

o “The Database Mirroring Endpoint (SQL Server)” in the MSDN Library at http://go.microsoft.com/fwlink/p/?LinkId=247347

12 © Microsoft Corporation. All rights reserved.

15. You should now see backups of the database files and SQL Server transactions logs in the mirrorshare. This share or files are not required to be kept after mirroring has been configured.

16. On L15S1FE01, in Topology Builder click the to-do link. Then read and close the NextSteps, click Finish in the publishing wizard and exit Topology Builder.

17. Restart L15S1FE01, L15S1FE02, L15S1FE03 Front Ends.

Tip:shutdown /r /m \\machinename /t 1

Important: Whenever you make a change to a Back End Database mirroring relationship, you must restart all the Front End Servers in the pool. When you add or remove mirroring, Topology Builder displays instructions in the To Do list. For a change in mirroring, (such as changing the location of a mirror), you must use Topology Builder to perform these three steps:

1. Remove mirroring from the old mirror server.2. Add mirroring to the new mirror server.3. Publish the topology.

Exercise 2: Deploy Paired Front End Pool for Disaster Recovery

In this exercise, you will configure pool pairing for disaster recovery.

ScenarioContoso is deploying the disaster recovery topology of paired Front End Pools using Topology Builder. Pools pool.contoso.com and L15S2SE01.contoso.com will be paired.

Warning: There is no restriction on the distance between two data centers that are to include Front End pools paired with each other. You should use two data centers in the same world region, with high-speed links between them. It is best if the two data centers are separated enough to avoid a single disaster hitting both at the same time.

Having two data centers across world regions is possible, but could incur

Global Technical Readiness13

Lab 12: High Availability and Disaster Recovery

higher data loss due to latency in data replication.

When planning which pools to pair, keep in mind that only the following pairings are recommended as best practices:

Enterprise Edition pools can be paired only with other Enterprise Edition pools. Similarly, Standard Edition pools can be paired only with other Standard Edition pools.

Physical pools can be paired only with other physical pools. Similarly, virtual pools can be paired only with other virtual pools.

Neither Topology Builder nor topology validation will prohibit pairing two pools in a way that does not follow these recommendations like you are doing in this lab for training purposes. For example, Topology Builder allows you to pair an Enterprise Edition pool with a Standard Edition pool. However, these types of pairings are not recommended.

Each pool in a pair should have the capacity to serve all users from both pools in the event of a disaster.

If you pair Enterprise Edition pools, you can also implement high availability on the Back End Servers, but for pairs of Standard Edition pools only the disaster recovery measures are available.

Tasks1. On L15S1FE01, in Topology Builder, in the Corp site right-click one of the two Lync Server

2013 pools that will be paired, and then click Edit Properties.

2. Click Resiliency in the left pane, and then select Associated Backup Pool in the right pane.

3. In the box below Associated Backup Pool, select the pool that you want to pair with this pool. Only existing pools that are not already paired with another pool will be available to select from the list.

4. Select Automatic failover and failback for Voice, note the default intervals and then click OK.

5. When you view the details about this pool, the associated pool now appears in the right pane under Resiliency.

14 © Microsoft Corporation. All rights reserved.

6. Use Topology Builder to publish the topology and review the to-do list before clicking Finish.

7. If the two pools were not yet deployed, you would be deploying them now and the configuration would be complete. However, since the pools were already deployed before you defined the paired relationship, you must complete the following final steps.

8. Execute Get-CsManagementStoreReplicationStatus to verify all the local replicas are up to date on the Front End servers on the two paired pools after publishing the topology change.

9. On every Front End Server in both pools, run the following to complete local setup on each server. You can use the Lync Server Deployment Wizard, Step 2: Setup or Remove Lync Server Components instead. In this lab this would be VMs L15S1FE01, L15S1FE02, L15S1FE03, and L15S2SE01.

"C:\Program Files\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe"

Tip:To run in Lync Management Shell use the following syntax.&"C:\Program Files\Microsoft Lync Server 2013\Deployment\Bootstrapper.exe"

This configures other services required for backup pairing to work correctly.

10. Once the actions from the prior step have completed, on the Front Ends in both pools, from a Lync Server Management Shell command prompt, run the following cmdlets:

Start-CsWindowsService -Name LYNCBACKUP

Or from one server run the following replacing using each servers name.

Start-CsWindowsService -Name LYNCBACKUP -ComputerName <FEServername>

11. You should now see folders/files created by the backup service in LyncShare for each pool.

Global Technical Readiness15

Lab 12: High Availability and Disaster Recovery

12. Run the following cmdlets for both paired Pools to force a full sync of user and conference data. DataMCU does not generate journal file when backup relationship is not enabled and the backup service relies on journal file to do export:

Invoke-CsBackupServiceSync –PoolFqdn pool.contoso.com

and

Invoke-CsBackupServiceSync –PoolFqdn L15S2SE01.contoso.com

Important:The Automatic failover and failback for Voice option and the associated time intervals in Topology Builder apply only to the voice resiliency features that were introduced in Lync Server 2010. Selecting this option does not imply that the pool failover discussed in this document is automatic. Pool failover and failback always require an administrator to manually invoke the failover and failback cmdlets, respectively.

Note: It is normal to get the message "No Central Management services were found for the pool you specified to back up" when that pool does not host the Central Management Store.You can invoke backup of just a particular module Invoke-CsBackupServiceSync -PoolFqdn <poolFqdn> [-BackupModule {All|PresenceFocus|DataConf|CMSMaster}]

13. The backup service configuration settings are used to manage pool backups in Microsoft Lync Server 2013. Note that Lync Server allows only for a single, global collection of backup configuration settings. Among other things, that means that all your pools must be backed up using the same synchronization schedule, and that users and groups authorized to backup Pool A are also allowed to backup Pools B, C, D, and E. These settings include information about the maximum number of simultaneous Windows Communication Framework calls that can be made to the backup service, as well as the backup service synchronization interval.

Execute

Get-CsBackupServiceConfiguration

and note the settings.

16 © Microsoft Corporation. All rights reserved.

14. The Get-CsBackupServiceStatus cmdlet enables administrators to verify that the backup service for a specified Registrar pool has been configured and is working properly. Note that, by default, only users who belong to the RTCUniversalServerAdmins group are allowed to run this cmdlet and check the backup status for a pool. To provide additional groups with permission to run the cmdlet, use the Set-CsBackupServiceConfiguration cmdlet to add those groups to the AuthorizedUniversalGroups property.

15. Execute the following to check the status in both directions.

Get-CsBackupServiceStatus -PoolFqdn pool.contoso.com

and

Get-CsBackupServiceStatus -PoolFqdn L15S2SE01.contoso.com

If you receive the following error, restart all the Front Ends in each paired pool to consume the changes.

16. If you receive permissions error, resolve by adding CSADMINISTRATOR to the RTCUniversalServerAdmins universal group in AD.

17. Execute the following for both paired pools again after resolving any issues.

Get-CsBackupServiceStatus

18. If you received not initialized for either, check the Share permissions for the file store associated with the pool. More than likely the share permissions are incorrect.

They should look like the following on an Enterprise Edition Pool share.

C:\>net share lyncshareShare name LyncsharePath C:\Lyncshare

Global Technical Readiness17

Lab 12: High Availability and Disaster Recovery

RemarkMaximum users No limitUsers Caching Manual caching of documentsPermission Everyone, FULL NT AUTHORITY\NETWORK SERVICE, CHANGE BUILTIN\Administrators, FULL CONTOSO\RTCHSUniversalServices, CHANGE CONTOSO\RTCComponentUniversalServices, CHANGE CONTOSO\RTCUniversalServerAdmins, CHANGE

Note: File Store share on Standard Edition server should have the additional following permissions.<SE ServerName>\RTC Local Administrators, CHANGE<SE ServerName>\RTC Server Local Group, CHANGE<SE ServerName>\RTC Component Local Group, CHANGE

19. Execute

Get-CsBackupServiceStatus | fl

Note: The Backup Service sync status is defined unidirectionally from a pool (P1) to its backup pool (P2). The sync status from P1 to P2 can be different than the one from P2 to P1. For P1 to P2, Backup Service is in a “steady” state if all the changes made in P1 are completely replicated over to P2 within the sync interval. It is in the “final” state if there are no more changes to be synchronized from P1 to P2. Both states indicate a snapshot of the Backup Service at the time the cmdlet is executed. It does not imply that the state returned will stay as is afterwards. In particular, the “final” state will continue to hold only if P1 does not generate any changes after the cmdlet is executed. This is true in the case of failing P1 over to P2 after P1 is placed into the read-only mode as part of the Invoke-CsPoolfailover execution logic.

18 © Microsoft Corporation. All rights reserved.

20. The Get-CsPoolBackupRelationship cmdlet returns the fully qualified domain name of the backup pool associated with a Registar pool. Note that this is read-only information: there is no corresponding Set-CsPoolBackupRelationship cmdlet that lets you use Windows PowerShell to create a backup association. Instead, backup pools must be assigned using Lync Server Topology Builder.

Execute

Get-CsPoolBackupRelationship -PoolFqdn pool.contoso.com

It should return the target pool L15S2SE01.contoso.com that you associated earlier in Topology Builder.

Exercise 3: Experiencing a Front End Server Failure In this exercise, you will observe the behavior of Lync Server 2013 when a front-end server goes down. In the Corp site, you deployed three front-end servers, L15S1FE01, L15S1FE02, and L15S1FE03. You will now take one of these servers down and verify the behavior in this scenario.

ScenarioContoso is testing cluster resiliency.

Tasks1. RDP to WIN7A so you have remote audio, launch Lync 2013, and sign in as

aalberts@<lync#>.msftonlinerepro.com

For any Windows Security/Microsoft Lync logon prompts use contoso\aalberts.

2. Start a Meet Now meeting.

Global Technical Readiness19

Lab 12: High Availability and Disaster Recovery

3. On L15S1FE01, in Lync Management Shell execute

Get-CsUserPoolInfo sip:aalberts@<lync#>.msftonlinerepro.com

4. Note the users PrimaryPoolMachine. You should see three in preferred order.

5. Execute

Stop-CsWindowsService -Computername <Name of first server in PrimaryPoolMachinesInPreferredOrder list> -name rtcsrv

6. Observe behavior of Lync 2013 on WIN7A for a couple of minutes. You may or may not see the client disconnect and reconnect to secondary server. You could sign in with another user on WIN7B and carry on a conversation, add contacts, etc.

20 © Microsoft Corporation. All rights reserved.

7. Back on L15S1FE01, execute the following again and note that the primary pool machine listed earlier is no longer listed and see that the user is connected to one of the secondaries.

Get-CsUserPoolInfo sip:aalberts@<lync#>.msftonlinerepro.com

Global Technical Readiness21

Lab 12: High Availability and Disaster Recovery

8. Execute

Start-CsWindowsService -Computername <Server Previously stopped>

9. After a minute or so execute the following to see what the new PrimaryPoolMachines preferred order is set to.

Get-CsUserPoolInfo sip:aalberts@<lync#>.msftonlinerepro.com

Exercise 4: Experiencing a SQL Server Failure or outageIn this exercise, you will simulate a SQL Server failure by stopping the SQL Service on the L15S1SQL01 SQL server. You will then run the necessary commands in the Lync Server Management Shell to allow failover to the mirrored databases. Without a witness server, a Lync Administrator must manually perform the failover process.

ScenarioContoso is testing cluster resiliency with backend database mirroring.

TasksSimulate a SQL Failure

1. On L15S1FE01, in Lync Server Management Shell, determine which back-end database is the principal and which is the mirror by executing:

Get-CsDatabaseMirrorState -PoolFqdn pool.contoso.com -DatabaseType User

2. On L15S1SQL01, click Start, click Administrative Tools, and then click Services.

3. In the Services console, right-click SQL Server (MSSQLSERVER) and then click Stop.

22 © Microsoft Corporation. All rights reserved.

4. On the Stop Other Services page, click Yes.

5. Leave the Services console running.

6. On WIN7A, verify Lync 2013 client is still functional by changing your status.

Configure failover to the mirrored database

7. On L15S1FE01, in the Lync Server Management Shell, type the following command and then press Enter.

Get-CsService –CentralManagment

This will show the CMS is located on Lync Server 2010, so you do not need to failover the CMS database. If the database server that hosts the CMS had failed, you would first need to failover the CMS.

Global Technical Readiness23

Lab 12: High Availability and Disaster Recovery

8. When the principle has failed, you can still determine which back-end database is the principal by executing the following cmdlet and reviewing the output.

Get-CsDatabaseMirrorState -PoolFqdn pool.contoso.com -DatabaseType User

9. Perform the failover of the user database (Primary to Mirror):

Invoke-CsDatabaseFailover -PoolFqdn pool.contoso.com -DatabaseType User -NewPrincipal mirror -Verbose

Important:-DatabaseType User only fails over the user databases. If other databases are on the failed server consideration should be given to failing them over in a production environment.As you can see in the screenshot for L15S1SQL02 only rtcab, rtcshared, and rtcxds were failed over. Monitoring, Archiving, and Apps databases were not failed over.

24 © Microsoft Corporation. All rights reserved.

10. Review the error and force the failover by adding the -Force parameter to the cmdlet.

Invoke-CsDatabaseFailover -PoolFqdn pool.contoso.com -DatabaseType User -NewPrincipal mirror -Verbose -Force

Global Technical Readiness25

Lab 12: High Availability and Disaster Recovery

11. Execute the following and note that the mirror is now Principal for the user database.

Get-CsDatabaseMirrorState -PoolFqdn pool.contoso.com

26 © Microsoft Corporation. All rights reserved.

12. On L15S1SQL01, in the Services console, right-click SQL Server (MSSQLSERVER) and then click Start.

13. Also, start the SQL Server Agent (MSSQLSERVER).

14. On L15S1FE01, execute the following to verify primary and mirrored databases are synchronized.

Get-CsDatabaseMirrorState -PoolFqdn pool.contoso.com -DatabaseType User

If the mirror state shows as suspended execute the following steps, otherwise skip to step 15.

a. Connect to L15S1SQL02, run SQL Server Management Studio,

Global Technical Readiness27

Lab 12: High Availability and Disaster Recovery

connect,

expand the databases, and right-click the suspended database,

select Tasks, then Mirror

28 © Microsoft Corporation. All rights reserved.

On the Database Properties page, click Resume.

Review any additional information windows and then click Yes and then click Ok.

Global Technical Readiness29

Lab 12: High Availability and Disaster Recovery

Repeat for any additional databases as needed.

Refresh and verify databases are Synchronized.

Rerun Get-CsDatabaseMirrorstate -PoolFqdn pool.contoso.com to see that all are synchronized.

30 © Microsoft Corporation. All rights reserved.

Failback to the principal database

15. Failback to the principal database when synchronized.

Invoke-CsDatabaseFailover -PoolFqdn pool.contoso.com -DatabaseType User -NewPrincipal primary -Verbose

Global Technical Readiness31

Lab 12: High Availability and Disaster Recovery

Exercise 5: Experiencing a Pool OutageIn this exercise, you will simulate a pool failure by stopping the service on the L15S2SE01 server. You will then run the necessary commands in the Lync Server Management Shell to allow failover to the backup pool.

ScenarioContoso is testing Lync pool pairing disaster recovery.

TasksSimulate a Pool Failure

1. On WIN7B, sign into Lync 2013 as bduncan@<lync#>.msftonlinerepro.com. (Bart Duncan) is homed on pool L15S2SE01.contoso.com in Site 2.

2. On WIN7A, sign into Lync 2013 as aalberts@<lync#>.msftonlinerepro.com.

3. On L15S1FE01, execute the following to stop Front End service on L15S2SE01.

Stop-CsWindowsService -ComputerName L15S2SE01 -Name rtcsrv

4. On WIN7B, notice that Lync signs out and after a few minutes will sign back in and then shows the Limited functionality notification prompt.

If it is taking too long to sign back in automatically, click Cancel Sign-In and then click Sign-In.

5. At this point, the client on the failed pool would have Lync Server 2010 functionality for voice resiliency.

6. On L15S1FE01, execute

Get-CsManagementStoreReplicationStatus -CentralManagementStoreStatus

We know CMS is on L2010SE01 and not in the paired pool relationship. If the Central Management Server is not available or if the Central Management Server was running on L15S2SE01 (that is, the pool that has failed), you must fail over the Central Management Server before failing over the pool. If you need to fail over the Central Management Server that was hosted on a pool running Lync Server 2013, follow the product documentation steps at http://technet.microsoft.com/en-us/library/jj204678(v=ocs.15).

7. Fail the users from L15S2SE01.contoso.com to pool.contoso.com.

Invoke-CsPoolFailover -PoolFQDN L15S2SE01.contoso.com -DisasterMode -Verbose

32 © Microsoft Corporation. All rights reserved.

8. On WIN7B, check the client status. After several minutes, full client functionality should be restored.

9. Execute the following cmdlet to verify that pool L15S2SE01.contoso.com is in the failed over state.

Get-CsRegistrarConfiguration

Global Technical Readiness33

Lab 12: High Availability and Disaster Recovery

10. Start services on the failed pool.

Start-CsWindowsService -ComputerName L15S2SE01.contoso.com -Name rtcsrv

11. Check Pool backup state for both paired pools by executing the following for each.

Get-CsBackupServiceStatus -PoolFqdn <Poolname>

12. Fail back the pool.

Invoke-CsPoolFailBack -PoolFQDN L15S2SE01.contoso.com -Verbose

34 © Microsoft Corporation. All rights reserved.

Global Technical Readiness35

Lab 12: High Availability and Disaster Recovery

If you receive an error with failover/failback or with the backup service verify that involves WCF verify that the Net.Tcp Listener Adapter and Net.Tcp Port Sharing Service services are running on all Fronts Ends in the paired pools.

36 © Microsoft Corporation. All rights reserved.

13. Execute the following to check that l15s2se01 pool is now in active state.

Get-CsRegistrarConfiguration

Global Technical Readiness37

Lab 12: High Availability and Disaster Recovery

Appendix A: Exercise 1In exercise 1, creating the mirror during publishing of the topology fails due to Network Service account that the SQL Server Services are running under not having permissions to the \\L15s1sql01\mirrorshare.

You can resolve this by granting "Everyone, FULL" permissions on the share.

This file share usage is temporary and is only used by the install-csmirrordatabase during mirroring setup and configuration.

38 © Microsoft Corporation. All rights reserved.