How to query SQL server to know if the SQL instance is in shutdown-in-progress state ?

  • 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

  • What is the status of SQL Server services when you receive this error message?

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply