Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

check which SQL Server Service Start Type is set by query? Expand / Collapse
Author
Message
Posted Thursday, October 11, 2012 2:16 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, October 18, 2014 7:23 AM
Points: 152, Visits: 389
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
Post #1371268
Posted Thursday, October 11, 2012 5:24 AM


Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, March 21, 2014 9:46 AM
Points: 387, Visits: 1,078
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.
Post #1371374
Posted Thursday, October 11, 2012 5:39 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Saturday, October 18, 2014 7:23 AM
Points: 152, Visits: 389
Thanks a lot,

a SQL variant would be nice, but I am also happy, that I can use PowerShell for a serious task :)
Post #1371384
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse