Hi folks,
I have a requirement to query the state of a SQL instance to know if it is shutdown in progress. Is there a DMV table or a system stored procedure that can give me the info.
One method is to open a connection using a user that does not have sysadmin permissions where the connection establishment fails with the following error :
" SHUTDOWN is in progress. Login failed for user 'xyz'. Only administrators may connect at this time "
The question is how to query this shutdown-in-progress state using the sysadmin user.
Regards,
-Sajeev