4

Using SQL 2016 Enterprise Edition

The default instance will listen on 1433 and the DAC port will listen on TCP 1434. SQL Browser will listen on UDP 1434. Any subsequent named instances will get a dynamically allocated port from windows in the range 49152 to 65535 as will their DAC ports. Connection requests (including DAC) to those named instances will make a call to SQL Browser and told the port number.

You can use the SQL Server Configuration Tool to change the port for the named instance to a static port number, but there is no option to set the DAC port to a static port number.

When I suggested to the networks team that I'd like the entire port range opened up for remote DAC connectivity, they were less than enthusiastic.

Is there any way to set the DAC port to a known, static port number for named instances?

  • 1
    This post indicates that you can edit the registry to fix the port. sqlservercentral.com/blogs/james-sql-footprint/2013/04/10/… – Jonathan Fite May 10 '18 at 14:34
  • Curious, why do you need remote DAC connections? Typically connecting to the DAC is one of the emergency measures performed while logged on to the server through RDP or PowerShell Remoting. – David Browne - Microsoft May 10 '18 at 15:05
  • @DavidBrowne-Microsoft - RDP can be totally unusable when the server is under extreme load. PowerShell remoting is way harder to use than a quick connection via the DAC. – Max Vernon May 10 '18 at 15:27
  • But if some other tool or user has the DAC connected remotely, you're out-of-luck. – David Browne - Microsoft May 10 '18 at 15:37
  • 2
    @DavidBrowne-Microsoft - clearly. However, since you have to be a member of the sysadmin server role to use the DAC, there's a great chance it'll be a DBA connected to it. If it's not a DBA connected to it, then you're doing it wrong™. – Max Vernon May 10 '18 at 16:31
8

Taken from the Microsoft Support site:

To configure a static port for the specialized Dedicated Administrator Connection (DAC), you must update the registry key that corresponds to your instance. For example, the registry key may be the following:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.X\MSSQLServer\SuperSocketNetLib\AdminConnection\Tcp

Note The "X" in "MSSQL.X" is a number that indicates the directory where the instance is installed for SQL Server 2005 or the instance name for SQL Server 2008.

Although the article talks about SQL Server 2008, this works for all Windows-based versions from 2005 and above. SQL Server on Linux uses a different mechanism, which I am not yet aware of.

  • 1
    Thanks. I was worried that it might be something like that. Bonus uptick for the comment above :) – Gavin Harris May 11 '18 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.