THE SQL Server Blog Spot on the Web

Welcome to - The SQL Server blog spot on the web Sign in | |
in Search

The Rambling DBA: Jonathan Kehayias

The random ramblings and rantings of frazzled SQL Server DBA

Customizing the TCP Port for the Dedicated Administration Console (DAC)

If you have a multi-instance SQL Server 2005/2008 Server that is behind a firewall, and you want to be able to remotely connect to the DAC, you have to create firewall rules that allow the TCP ports for the DAC through the firewall.  You can easily set the port that the SQL Server Instances listen on using the SQL Server Configuration Manager.  However, it doesn't include the DAC in the tool.  I had this problem over two years ago and ended up giving up on finding a solution to being able to set a fixed port for the DAC in SQL Server.  I assumed that I would just have to RDP to the server and from there hit the DAC to figure out what was hanging SQL up.  Luckily I have only ever had to use the DAC once, and it wasn't this particular server.

Tonight I was catching up some newsgroup threads and the same problem was posed in a question.  There was only one answer, and it was pointing to a Microsoft KB Article:

So there is a work around for it, but you have to manually edit your registry.  Probably not a big deal since not many people fall into this category.  Or is it?  Windows Server 2008 by default comes with the firewall installed, and locked down, so you have to know what ports you need to open if you leave the firewall turned on.  The SQL Server Installer even gives you a nice warning about your firewall while installing on Windows Server 2008.  How you do fix the port?  It's not to bad.  Per the KB article:

To configure an instance of SQL Server 2005 to use a static port, follow the steps described in the "How to: Configure a Server to Listen on a Specific TCP Port (SQL Server Configuration Manager)" topic in SQL Server 2005 Books Online.
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.

Thanks need to go out to Nilton Pinheiro who provided the reference on the newsgroup thread.  Now I'll have to submit a request for firewall changes to get the new fixed ports opened up for this server in the morning.

Published Friday, June 26, 2009 1:30 AM by Jonathan Kehayias



Scott Gleason said:

Thanks Jonathan.. this is exaclty what I was looking for.

:-) Scott Gleason

February 4, 2011 10:25 AM
Anonymous comments are disabled

This Blog


Privacy Statement