Friday, December 6, 2013

Connecting to SQLServer using dedicated admin connection (DAC)

Connecting to SQLServer using dedicated admin connection (DAC)

DAC helps us to trouble shoot performance problems in case server is not responding 
it also help us to decrypt stored procedure using this connection

we can connect SQL Server using dedicated admin connection in different ways

we can connect using sql server management studio





  admin: ---> is used for connecting sqlserver dedicated admin 
  MALLIREDY\MALLSREDDY --- Instance name to connect

Click on connect.you may get error like this

Dedicated administration connections are not supported.



  1. This error will occur we connect dedicated admin connection using object explorer.object explorer connection will not support dedicated admin connection.
  2. you may also get the below error






In order to use DAC we must start SQL Server browser



open run command. type services.msc




Connect using new query without connecting using object explorer like this





It will connect connect successfully as below








Alternately you connect using SQL CMD mode also

SQLCMD -S SERVERNAME -A --FOR WINDOWS LOGIN
SQLCMD –S [SQL Server Name] –U [Username] –P [Password] –A 



No comments: