check which SQL Server Service Start Type is set by query?

  • Hi all,

    we had a "funny" disaster in the morning, because the VM was restarted and the SQL Server Service wasn't, because some joker set it to manual mode.

    There are intesting SP I googled like EXEC xp_servicecontrol, but what I really need is a query, that tells me the Start Type for all our servers.

    Thank You in advance

  • I have a powershell query which will list you all services running Manual Mode.

    Get-WMIObject -Query "Select * from Win32_Service" | Select-Object name,Startmode -- list all services

    Get-WMIObject -Query "Select * from Win32_Service Where StartMode='Manual'" | Select-Object name -- list services with manual mode start

    I am trying to run it from xp_cmdshell . I will get back once I get it.

  • Thanks a lot,

    a SQL variant would be nice, but I am also happy, that I can use PowerShell for a serious task 🙂

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

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