Search notes:

SQL Server: dedicated administrator connection (DAC)

A dedicated administrator connections (DAC) is the last resort for a DBA when trying to fix an instance where no new connections are possible anymore because its resources are exhausted. For such situations, SQL server always retains a limited chunk of memory and other necessary resources to allow a last connection: the dedicated administrator connection.
A DAC is also required to select from the system base tables.

Connect with Management Studio

With Management Studio, a dedicated administrator connection cannot be opened with the usual connection method. The following error is thrown.
Dedicated administrator connections are not supported via SSMS as it establishes multiple connections by design. (Microsoft.SqlServer.Management.SqlStudio.Explorer)
A dedicated administrator connection needs to be established with a Database Engine Query. This is found in the menu File -> New -> Database Engine Query:
When the connection dialog opens, the server name needs to be prefixed with admin::

Connect with sqlcmd

In order to make a dedicated administrator connection with sqlcmd.exe, the -A command line option needs to be specified:
C:\> sqlcmd -S . -A

Allow connections from any machine in the network

By default, dedicated administrator connections are only allowed from a machine where the instance is running (because it listens on the loop back device 192.168.0.1 port 1434). In order to make a DAC from another machine in a network, the remote admin connections Server Configuration Option must be set:
sp_configure 'remote admin connection', 1
go
reconfigure
go

See also

The registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\instance name\MSSQLServer\SuperSocketNetLib\AdminConnection

Index