Setting the DAC port….

G’day,

I had a situation today where I needed to ensure that the dedicated Administrator connection (DAC) ran on a specific port.

The main reason that I wanted it on a specific port was so I could use the connection remotely (if needed) and because the connection was on a fixed port I could ensure that there was a firewall rule in place to open that specific port. I was using a named instance of SQL SERVER.

so, here’s the steps that I took to do this, as there appears to be no way in any UI tool to set the port of the DAC.

  1. Change the value of the following registry key to the value of the port that is desired for the DAC to operate on.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.<instance name>\MSSQLServer\SuperSocketNetLib\AdminConnection\Tcp
  2. Open the port in the firewall to allow connections on that port
  3. Configure the server to allow remote DAC connections.

I did not have to re-start the SQL server instance for this change to take place.

UPDATE :

It seems that if the DAC has preciously been used by the the SQL instance since the last time it was started then the instance retains the setting in memory. In this case the instance will need re-starting.  This can only ascertained by testing after changing this port in the registry.

UPDATE 2

If you still can’t connect, it is worth checking your endpoints (if only to eliminate that as an issue) – check out this article from Cleveland DBA (Colleen Morrow)

Have a good day.

cheers

Martin.

Tags:

About Martin Catherall

Martin Catherall is Senior SQL consultant at SQL Down Under, based in Melbourne, Australia. Martin is also a Microsoft Data Platform MVP and Regional Mentor (RM) for the Professional Association for SQL Server. Prior to relocating to Australia he was extremely active in the Christchurch, New Zealand data community - founding the local SQL Server user group and organizing SQL Saturday Christchurch - which later became SQL Saturday South Island. He likes learning interesting stuff about processing and storing data and passing on his knowledge. In his spare time he likes to learn guitar and hang out with his two young sons Callum Glen and Robert Michael.