How do I know whether I have logged-In as DAC or Normally logged-In ?
SELECT 'You have connected as "DAC"' [Who you are]
FROM sys.dm_exec_sessions s join sys.endpoints e
ON (s.endpoint_id = e.endpoint_id)
WHERE e.name ='Dedicated Admin Connection'
AND s.session_id = @@spid
GO
FROM sys.dm_exec_sessions s join sys.endpoints e
ON (s.endpoint_id = e.endpoint_id)
WHERE e.name ='Dedicated Admin Connection'
AND s.session_id = @@spid
GO
1. Connect with Instance using SQLCMD by Trusted Connection
2. Paste the above script and execute it
Connect normally (Trusted Connection) using SQLCMD :-
Connect as DAC using SQLCMD :-
No comments:
Post a Comment