Open a ticket
Chat with us
BLOG Published on 2015/09/02 by Asitha De Silva in Tech-Tips

Remote Desktop Connection Broker High Availability Part 2 - with SQL Mirror

From my previous post of Implementing RD Connection broker High availability, I have described step by step on how to implement remote desktop connection broker in a high available scenario. It will make brokers high available but both brokers depend on one SQL server. Failure to the SQL server can lead to a service disruption.

From this article I’m going to high available the SQL server by using a SQL mirror. So brokers will not depend on one database server. Solution will be fully high availability supported J


Deployment prerequisites


  •  Please refer the Implementing RD Connection broker High availability article to create the high available RD brokers with SQL server.
  • Another server to create the SQL mirror, Install the same SQL server version in the new server, use the same accounts as in mirror server.
  • Witness server – this is for automatic fail over purpose. It can be another SQL server or Install SQL Express version on a server. No need of a dedicated server this can be a server that uses for other purpose
  • Added firewall exceptions to all SQL servers.



Step 01 – Configure SQL mirror


  1. Please refer the following technet articles when crating the mirror.
    http://technet.microsoft.com/en-us/library/ms189053.aspx


    http://technet.microsoft.com/en-us/library/ms189047(v=sql.105).aspx

  2. Login to principle SQL server and connect to mirror database and witness database server from that management consol. Perform this step to identify the connectivity to all principle, witness and mirror database servers.



  3. Change the principle server’s RD database to full recovery mode.

  4. Please refer the technet article, I’m just only giving the steps that you have to perform.

    http://technet.microsoft.com/en-us/library/ms189047(v=sql.105).aspx

  5. Backup the principle database and restore it in mirror server using NO RECOVERY mode

  6. Backup the transactions and restore it in mirror server using NO RECOVERY mode

    Note – all SQL servers SQL service should run as a domain user. And check in mirror server side, Database should have sysadmin, owner, public right to the security group of RD brokers.

  7. Note – all SQL servers SQL service should run as a domain user. And check in mirror server side, Database should have sysadmin, owner, public right to the security group of RD brokers.

  8. Expand Databases, and select the database to be mirrored. Right-click the database, select Tasks, and then click Mirror. This opens the Mirroring Page of the Database Properties dialog box.

  9. Click Configure Security.

    http://technet.microsoft.com/en-us/library/ms175919.aspx










If the mirror successful, check the failover


Step 02 – Configure RD brokers to support SQL mirror.

When configuring Remote desktop connection broker high availability, you have to provide the database connection string. Connection string point the SQL database to the brokers. Implementing RD Connection broker High availability article cover this. To support the SQL Mirror this connection string need to be changed. Modifying the connection string is not supported in GUI, but it can be edited using PowerShell. 


  1. Login to a Broker server and open PowerShell in run as a administrator.

  2. to import the PowerShell module type
    Import-Module remotedesktop

  3. To check the current configurations type following command –
    Get-RDConnectionBrokerHighavailablity

  4. Set the connection string 
    Set- RDDatabaseConnectionString -DatabaseConnectionString “DRIVER=SQL Server Native Client 10.0;SERVER=<Principle server name>;Failover_Partner=<Mirror Server>;Trusted_Connection=Yes;APP=Remote Desktop Services Connection Broker;Database=<DatabaseName>;

  5. If the command succeeds, confirm it in GUI mode.




To test the configurations, fail over the principle database to the mirror using SQL management console. After that refresh the connections from Server manager – Remote desktop services - collections – connections and refresh. If mirror successful RD connections will remain connected. 

If the connections are empty, that means broker servers are not connecting to the mirror server database, most common problem is database security in mirror server. So check all brokers have full access to the mirror database and mirror database saved folder.



Hope this information is useful 

Cheers 

Asitha






Asitha De Silva

Consultant Cloud Solutions

Expert in architecting and implementing cloud-based infrastructure solutions.

Newsletter

To keep up with the news and updates related to our products, make sure to subscribe to our newsletter!

Copyright © 2024 Terminalworks. All Rights Reserved