Use Command below to connect as DAC
SQLCMD -A |
It is on by Default for local server.
For remote(via network) enable it by running query below
sp_configure |
For Clusters, recommended to enable remote admin connections as no local DAC available
---- Query to Find if DAC - Dedicated Admin Connection used -----
select s1.session_id, s1.program_name,s1.host_name,t1.name from sys.tcp_endpoints t1 join on t1.endpoint_id = s1.endpoint_id where t1.name = --- End of the Query ----- |
--- Query to check the DAC ---- --- Scheduler_ID = 255 & Status = "VISIBLE ONLINE (DAC) --- select |
Usage:
when SQL Server hangs, SQL Server does not respond, when SQL Server does not accept new connection
- Use DAC sparingly for monitoring and Troubleshooting
- Connect to master database first
- Use lightweight queries.
- Not advised for long running queries like ( DBCC CHECKDB, DBREINDEX, INDEXDEFRAG )
No comments:
Post a Comment