Pages

Wednesday, May 8, 2013

Step by Step Configuring Data Base Mirroring for Lync 2013

Configure Data Base Mirroring Lync for 2013

As we know SQL Clustering is not Supported. But you can still use it but Microsoft will not support it.

In this Blog we will see how to create SQL Mirroring 

In this i will be using as i did in my Lab I have Configured two sql server in my Enterprise pool Sql01 and Sql02.

And I will be using Witness server has my Domain controller For just the Lab purpose. In my DC Sql server 

First we will be creating SQL Mirror File Share in my Domain Controller 

Create a Folder SQLMirrorShare under C drive 
1) Right Click the newly created Folder SQLMirrorShare and select Properties
2) Click the Sharing tab. Then Click Advanced Sharing Button.
3) Check the "Share this folder" Checkbox
4) Click the Permissions button.
5) In the permissions for SQLMirrorShare dialog box, Click Everyone group and the Remove it.
6)Click the Add button.click the object types button. In the object types dialog box select service accounts checkbox. Leave the other checkboxes checked and clieck ok
7).  In the Enter the object names to select textbox, type in Administrators;SQLSvc and click Check
Names. Ensure that both entries are underlined, and click Ok
8).   In the Permissions for SQLMirrorShare dialog, click the Administrators group, and check the Full
Control checkbox in the Allow column
9)Still in the Permissions for SQLMirrorShare dialog, click the SQLSvc user account, and check the
Full Control checkbox in the Allow column
10)Click Ok to return to the Advanced Sharing Dialog box. Click OK, then click Close


Now go to Front End server 

Start and then click Lync Server Topology Builder

1) In the Topology Builder, expand Lync Server, expand Lync Server 2013, and then expand Enterprise Edition Front End pools
2) Right-click pool.contoso.com and then click Edit Properties
3)On the Edit Properties page, under Associations, select the Enable SQL store mirroring check box
and then click New
4)In the Define New SQL Server Store window, in the SQL Server FQDN box, type sql02.contoso.com
5)Select Named Instance, and then in the box, type Lync2013 (Note: It is instance name which we will be giving while installing SQL)
6)Take note of the default mirror port number given and then click OK
7)In the Edit Properties dialog box, under Associations, select the Use SQL Server mirroring witness to enable automatic failover checkbox and then click Ne
8    8) In the Define New SQL Server Store window, in the SQL Server FQDN box, type dc1.contoso.com (Note: This is nothing but the Witness server at the beginning  which we have created the sql mirror share in my case i have used DC because of Lab purpose)
      9)Select Named Instance, and then in the box, type Lync2013
     10)Take note of the default mirror port number given and then click OK
     11 On FE01, in the Topology Builder, expand Shared Components and then expand SQL Server stores
     12) Right-click test-sql01.contoso.com\Lync2013 and then click Edit Properties
     13).    In the Edit Properties window, in the Mirror port number box, type 5022 and then click OK
    
     Now Go to FE server In the Topology Builder select Lync server 2013 right click and then Publish 
      1) On the Publish the topology page, review the actions that should be completed and then click Next
      2)On the Create mirror databases page, verify that test-sql02.contoso.com has a check in the checkbox.
      3)Click test-sql02.contoso.com and then click Settings
      3)In the Mirror Database Settings window, in the Path to file share box, type \\dc- dc1.contoso.com\SQLMirrorShare and then click OK ( Note: The Sqlmirror share FQDN)
      4)Back on the Create mirror databases page, click Next
      5)Wait as the topology is published
      6)On the Publishing wizard complete page, click Finish


      Now we will verify the Configuration in SQL using Sql Management studio

     1) Log in to test-SQL01, click Start, and then click SQL Management Studio and connect to the server.
     2) In the Object Explorer Expand Databases it will show as Principal, Synchronized

     


      





3) Right click cpsdyn (Principal, Synchronized), select Tasks, Mirror. you will Notice under Operating mode, that High safety mode with automatic failover (synchronous) is selected








Now Log in to Second Sql server test-SQL02 then click SQL Management Studio

1) Connect to the server In the Object Explorer Expand Database 
2) You will notice Notice the databases listed show as (Mirror, Synchronized / Restoring) as Below Screen shot 





To check the replication status Get-CsDatabaseMirrorState –PoolFqdn pool.contoso.com –DatabaseType User



Fail over the databases to the mirrored instance go to FE in the Lync Management Shell Type this command

Invoke-CsDatabaseFailover –PoolFqdn lon-pool.adatum.com –DatabaseType User –NewPrincipal mirror  



Once your Sql primary is back online and you want to fallback to Primary

 Fail the database instances back to the original primary SQL instance go to FE in Lync Management Shell Type this command 

Invoke-CsDatabaseFailover –PoolFqdn lon-pool.adatum.com –DatabaseType User –NewPrincipal
Primary

once you execute this command it will prompt to perform then Type A then hit Enter 

Once you have executed to check if it is fall back to Primary 

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

You see this results


DatabaseName            : rtcab
StateOnPrimary          : Principal
StateOnMirror           : Mirror 
MirroringStatusOnPrimary : synchronized 
MirroringStatusOnMirror : synchronized





As This is my First Blog you might see the mistakes. It would be helpful to me if you can comment any updates are issues so that i can correct it.















No comments:

Post a Comment