Affected versions: Windows Server 2022

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution — Primary Fix
  7. Solution — Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

Users cannot reconnect to existing sessions and load balancing fails when RD Connection Broker loses SQL database connectivity.

Environment & Reproduction

Common after SQL endpoint changes, certificate/cred rotation, or firewall policy updates between broker and database tier.

Get-Service Tssdis,RDMS
Test-NetConnection -ComputerName  -Port 1433
Get-WinEvent -LogName Application -MaxEvents 50 | Where-Object {$_.Message -match 'Connection Broker|RDMS|SQL'}

Root Cause Analysis

Primary causes include broken DSN/connection strings, SQL auth delegation issues, and network ACL drift blocking broker-to-db traffic.

Quick Triage

Check broker service state and direct SQL reachability before modifying RDS deployment metadata.

Get-Service RDMS,Tssdis
nslookup 
Invoke-Sqlcmd -ServerInstance ',1433' -Query "SELECT GETDATE()"

Step-by-Step Diagnosis

Review broker event logs and validate SQL permissions used by broker service account.

Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-SessionBroker/Admin' -MaxEvents 80
whoami /all
Get-ItemProperty 'HKLM:/SOFTWARE/Microsoft/RDMS' -ErrorAction SilentlyContinue

Solution — Primary Fix

Restore SQL connectivity path, correct connection settings, and restart broker services.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Restart-Service RDMS -Force
Restart-Service Tssdis -Force
New-NetFirewallRule -DisplayName 'Allow Broker to SQL 1433' -Direction Outbound -Protocol TCP -RemotePort 1433 -Action Allow

Solution — Alternative Approaches

Temporarily point broker to standby SQL endpoint if primary backend remains unavailable.

# Update broker DB endpoint in deployment settings
Set-RDConnectionBrokerHighAvailability -ConnectionBroker  -DatabaseConnectionString '' -ClientAccessName  -ErrorAction SilentlyContinue

Verification & Acceptance Criteria

Session reconnection works, broker logs are clean, and load-balanced distribution resumes.

Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-SessionBroker/Admin' -MaxEvents 20
quser
Get-Service RDMS,Tssdis

Rollback Plan

If changes fail, revert broker HA connection string and restore prior DNS/network policy snapshots.

Set-RDConnectionBrokerHighAvailability -ConnectionBroker  -DatabaseConnectionString '' -ClientAccessName  -ErrorAction SilentlyContinue

Prevention & Hardening

Baseline broker SQL dependencies, enforce connection tests in change windows, and alert on broker event signatures.

Register-ScheduledTask -TaskName 'RDSBrokerDBCheck' -Action (New-ScheduledTaskAction -Execute 'powershell.exe' -Argument '-Command "Test-NetConnection  -Port 1433"') -Trigger (New-ScheduledTaskTrigger -Once -At 00:30 -RepetitionInterval (New-TimeSpan -Minutes 10))

Related to RDMS startup failures, SQL login denied errors, and stale DNS records affecting broker backend resolution.

View all Windows Server 2022 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

Microsoft docs on RD Connection Broker high availability, SQL connectivity requirements, and RDS deployment troubleshooting.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.