How do I log into the Dedicated Admin Console (DAC) on Linux?
Clients

There are two Linux clients from Microsoft that can connect to SQL Server's Dedicated Administrator Connection (DAC),


mssql-cli. Versions newer than 0.90 have the -A option to connect to the Dedicated Administrator Connection (DAC). (QUOTED_IDENTIFIERS is on by default).

mssql-cli -S localhost -U sa -A

sqlcmd. This is the older client that ships with the mssql-tools package. It should never be used. If you insist on using it, you'll have to get accustomed to GO. Don't foget to always use -I with sqlcmd to turn on QUOTED_IDENTIFIERS. No idea why Microsoft chose the admin: prefix for sqlcmd. On most other clients, they use -A flag.

sqlcmd -I -S admin:localhost -U sa



Server Settings

If connecting from outside localhost you may have to enable remote DAC first. To do that simply run

sp_configure 'remote admin connections', 1 
GO
RECONFIGURE
GO