Saturday, November 26, 2011

How to connect SQL Server using DAC on New Query Window(SSMS)

1. Open the new SSMS
2. Connection to Server window will popup , Please cancel it
3. click the NewQuery (Top Left corner)
4. Enter the following one of the option like  below  connection to Server popup window

Server Name : ADMIN:Servername
Server Name : ADMIN:Servername\Instancename

Then you can run the below query to find connection

select * from sys.dm_exec_connections ec
join sys.endpoints ep on (ec.endpoint_id=ep.endpoint_id)
where'Dedicated Admin Connection'

Other option you can connect cmd prompt
c:\sqlcmd -S Servername -U sa -P 'xxxx' -A

No comments: