Blog Post

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.

Rate

You rated this post out of 5. Change rating

Share

Share

Rate

You rated this post out of 5. Change rating