|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 8:16 AM
Points: 105,
Visits: 320
|
|
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
|
|
|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 4:26 AM
Points: 300,
Visits: 485
|
|
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.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Today @ 8:16 AM
Points: 105,
Visits: 320
|
|
Thanks a lot,
a SQL variant would be nice, but I am also happy, that I can use PowerShell for a serious task :)
|
|
|
|