Enabling the Dedicated Administrator Connection (DAC) in SQL Server allows administrators to connect to a server even when it is unresponsive or heavily loaded, providing a vital troubleshooting lifeline. While local DAC is often enabled by default, enabling remote DAC requires a specific configuration change.
To enable Remote DAC using SQL Server Management Studio (SSMS), follow these straightforward steps:
- Open SSMS and connect to your SQL Server instance.
- Navigate to the Object Explorer.
- Right-click on the SQL Server Instance name.
- Select the Facets option from the context menu.
Configuring Surface Area for DAC
Within the Facets window, you need to adjust the server's surface area configuration.
- In the Facet drop-down list, select the value Surface Area Configuration.
- In the Facet properties section below, locate the RemoteDacEnabled property.
- Select the value True for the
RemoteDacEnabled
property.
Here's a quick summary of the steps:
Step | Action | Setting/Option | Value |
---|---|---|---|
1 | Right-click on Instance Name in SSMS | Select option | Facets |
2 | In Facet drop-down | Select value | Surface Area Configuration |
3 | In facet properties | Select property | RemoteDacEnabled |
4 | Set the value for RemoteDacEnabled |
Set to | True |
Click OK to apply the changes. This configuration allows administrators to connect to the DAC remotely.
Connecting to the DAC
Once the DAC is enabled (specifically, the RemoteDacEnabled
property is set to True
for remote access), you can connect to the SQL Server instance using its Dedicated Administrator Connection.
You can connect using tools like:
- SQL Server Management Studio (SSMS): When connecting, preface the instance name with
ADMIN:
. For example, if your instance name isMYSERVER\SQLINST
, you would enterADMIN:MYSERVER\SQLINST
in the Server name field. - SQLCMD: Use the
-A
switch when connecting. For example:sqlcmd -S MYSERVER\SQLINST -A
.
Using the DAC provides access to limited resources but is invaluable for diagnosing issues like deadlocks, performance problems, or runaway queries when regular connections are failing.
Note: Enabling remote DAC increases the server's surface area and should be done with caution. Ensure appropriate firewall rules and security measures are in place.