Part 3 – SQL Database Mirroring for Citrix XenApp/XenDesktop 7.x – Establish the Mirror

In parts 1 and 2, I’ve setup the Citrix database and performed a backup and restore in order to support database mirroring for redundancy in the Citrix environment.  In this post, I’ll setup SQL database mirroring.

When setting up database mirroring, you have the potential to specify (3) SQL servers:

  • Principal Server – MANDATORY – Server on which the database is currently in production (read-write)
  • Mirror Server – MANDATORY – Server on which the database is currently read-only
  • Witness Server – OPTIONAL – a SQL instance that monitors the servers and performs automatic failover should the principal server become unavailable.  A witness server, which can run SQL Express, is required to support automatic failover of the database.

Though I won’t recommend it, in my lab, I had the following setup and had no problems establishing the database mirror:

  • SQL Server 2012 SP2 running on my Principal and Mirror servers
  • SQL Express 2008R2 running on my Witness server

To setup SQL Database Mirroring

1. On the Principal server, open SQL Server Management Studio and expand Databases.  Right-click CitrixDB and select Tasks | Mirror

1_Tasks-Mirror

2. On the Database Properties | Mirroring screen, click Configure Security.

2_configureSecurity

3. On the Configure Database Mirroring Security Wizard screen, click Next.

4. On the Include Witness Server screen, click Yes and click Next.

3_withWitness

5. On the Choose Servers to Configure screen, select Witness server instance and click Next.

5_WitnessServer

6. On the Principal Server Instance screen, the principal server should be filled out correctly so click Next.

6_Principal

7. On the Mirror Server Instance screen, Connect to the appropriate mirror server instance and click Next.

7_MirrorServer

8. On the Witness Server Instance screen, Connect to the appropriate witness server instance and click Next.

8_WitnessServer

9. On the Service Accounts screen, enter the appropriate domain level account for all services and click Next.  The accounts should be the same for all servers….and though I used the administrator account here, I wouldn’t recommend it in full production.

9_SQLAccount

10. On the Complete the Wizard screen, click Finish.

10_Summary

11. Once the endpoints have been successfully configured, click Close.

11_Success

12. On the Database Properties pop-up, click Start Mirroring.

12_StartMirroring

13. When returned to the Database Properties | Mirroring screen, ensure the database Status reads Synchronized: the databases are fully synchronized and click OK.

13_Synchronized

14. The success of the mirroring operation can be further verified in SQL Server Management Studio as shown below:

14_SQL-Mirrored

At this point, the database is mirrored.  The next post, the final one of this series, will detail the setup of the first Citrix XA/XD delivery controller.

1 Comment

Filed under Citrix, Microsoft

One response to “Part 3 – SQL Database Mirroring for Citrix XenApp/XenDesktop 7.x – Establish the Mirror

  1. Pingback: Part 4 – SQL Database Mirroring for Citrix XenApp/XenDesktop 7.x – Installing Citrix XenApp | BallBlog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s