Skip to main content

How to Enable Dedicated Administrator Connection (DAC) in SQL Server Database

Enable Dedicated Administrator Connection in SQL Server Database by SSMS or by T-SQL command

What is DAC? Learn the Definition

DAC stands for Dedicated Administrator Connection. This feature got introduced in SQL Server 2005. This diagnostic connection basically helps users to remain connected and perform fundamental queries on troubleshooting when some severe performance issues occur. Only users with sysadmin role permission can use Dedicated Administrator Connection. The DAC offers an individual connection path which is mainly reserved for administrative troubleshooting purposes. This further allows database administrators to detect and inspect for problems when regular user connections are blocked or exhausted.

This is also used to prevent blocking sessions and check active requests. DAC can be established locally or remotely, depending on the configuration of SQL Server environment. By default, remote DAC access is disabled and must be enabled explicitly when troubleshooting is required.

How to Enable DAC in SQL Server? All Steps Explained

In order to enable the DAC in SQL Server, users can choose any of the below methods:

1. Using SQL Server Management Studio (SSMS)

To enable DAC with the help of SSMS, follow these steps:

Step 1: Right-click the current SQL Server Instance and choose Facets option from the context menu.

Click on Facets

Step 2: View Facets window will appear on your screen. Choose Surface Area Configuration for Facet category. Choose the value "True" for RemoteDacEnabled option.

Choose Surface Area Configuration

Step 3: Click on OK to enable DAC.

2. Using TSQL

Run the scripts to enable DAC through TSQL:

SQL
USE master
GO
/* 0 = Allow Local Connection, 1 = Allow Remote Connections */
sp_configure 'remote admin connections', 1
GO
RECONFIGURE
GO

Enable DAC for SQL Server Express

Note: SQL Server Express does not enable the Dedicated Administrator Connection (DAC) listener by default. It must be enabled by adding the -T7806 startup parameter.

Follow the steps given below to enable DAC in SQL Server Express Edition:

  1. Open SQL Server Configuration Manager.
  2. Select SQL Server Services.
  3. Right-click your SQL Server Express instance (for example, SQL Server (SQLEXPRESS)) and select Properties.
  4. Open the Startup Parameters tab.
  5. Add the following startup parameter: -T7806
  6. Click Apply.
  7. Restart the SQL Server (SQLEXPRESS) service.
Important: Without the -T7806 startup parameter, DAC connections on SQL Server Express will fail even if the Windows login belongs to the sysadmin server role.

Start the SQL Server Browser Service

  1. Open SQL Server Configuration Manager.
  2. Set Start Mode to Automatic.
  3. Click Start (if the service is not already running).