Administration

Dedicated Admin Connection (DAC)

Microsoft SQL Server provides a dedicated administrator connection (DAC). The DAC allows an administrator to access a running instance of SQL Server Database Engine to troubleshoot problems on the server—even when the server is unresponsive to other client connections. The DAC is available through the sqlcmd utility and SQL Server Management Studio.

  • Only members of the SQL Server sysadmin role can connect using the DAC.

  • By default, the connection is only allowed from a client running on the server. To enable client applications on remote computers to use the DAC, use the remote admin connections option of sp_configure.

sp_configure 'remote admin connections', 1;  
GO  
RECONFIGURE;  
GO
  • To conserve resources, SQL Server Express does not listen on the DAC port unless started with a trace flag 7806.

  • Bypasses logon triggers.

  • You can have only one active admin connection at a time. If a DAC connection is already active, any new request to connect through the DAC is denied with error 17810.

  • The DAC initially attempts to connect to the default database associated with the login. After it is successfully connected, you can connect to the master database. If the default database is offline or otherwise not available, the connection will return error 4060. However, it will succeed if you override the default database to connect to the master database instead using the following command:

    sqlcmd –A –d master
    

    We recommend that you connect to the master database with the DAC because master is guaranteed to be available if the instance of the Database Engine is started.

  • SQL Server prohibits running parallel queries or commands with the DAC. For example, error 3637 is generated if you execute either of the following statements with the DAC:

    • RESTORE

    • BACKUP

Connecting using SSMS

Using SSMS (SQL Server Management Studio),do nottry to connect using the standard connection from object explorer. With this connection type, SSMS uses several simultaneous connections which isn’t possible when using DAC.

Initiate the connection for example from_File_menu using_New / Database Engine Query._This ensures that you take only single connection.

When prompted for connection details, in the server name, use format:

  • ADMIN:[ServerName]

or with named instances:

  • ADMIN:[ServerName]\[InstanceName]

If you get the following error,

make sure that SQL Browser is running

make sure that DAC port is active

Diagnostic Connection for Database Administrators

How to: Use the Dedicated Administrator Connection with SQL Server Management Studio

remote admin connections Server Configuration Option

How to Establish Dedicated Admin Connection (DAC) to SQL Server

results matching ""

    No results matching ""