Friday, December 9, 2016

SOLVED! Moving RDS to a new SQL server

We have been trying to figure out what we needed to do to get our RDS server moved to another SQL server during a DR situation.

The message we were getting in the event log was:

The Remote Desktop Management service terminated with the following service-specific error %%4294967295

Now I looked at several articles online and there was a lot of different ideas, but in the end, with the help of my SQL Admin we figured it out! 

On my Windows 2012 R2 RDS Broker server I went into the registry searching for the connection string to the SQL server. It was located in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tssdis\Parameters key.

The DBConnString value had the whole connection string in there! Here is where we stumbled a little...(yes, I am a little slow on the uptake sometimes) 

DRIVER=SQL Server Native Client 11.0;SERVER=OURSQLSERVER,64229;Trusted_Connection=Yes;APP=Remote Desktop Services Connection Broker;DATABASE=RDBrokers

The number....right after SERVER=OURSQLSERVER? 64229? That is the port that our instance of SQL was originally running on. Turns out when we restored the SQL instance to our new server...the port had changed!


So we went into SQL Server Configuration Manager, selected the SQL Server Network Configuration, Protocols for (Instance Name), selected TCP/IP, right clicked and selected properties. Once the TCP/IP properties dialog box comes up, select the IP Addresses tab and in our case we scrolled to the bottom of the page to TCP Dynamic Ports under the IPALL heading and found the new port our SQL instance was running under.

Now, to get RDS up and running we could do one of two things....We can change the port the SQL instance is running under, stop and restart the SQL instance....or we can change the connection string that we referenced earlier. So we chose to do the later. We changed the 64229 port in the connection string to the new port 64225 and WHAM!!! RDS Management service started right up when we started it under services.

So after a quick happy dance. We tried RDS and we were back in business!

Hope this helps someone!

Thanks for reading!