SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
Arthur Kirchner
Arthur Kirchner
SSC-Enthusiastic
SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)

Group: General Forum Members
Points: 179 Visits: 398
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
SQL Show
SQL Show
SSChasing Mays
SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)SSChasing Mays (651 reputation)

Group: General Forum Members
Points: 651 Visits: 1078
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.
Arthur Kirchner
Arthur Kirchner
SSC-Enthusiastic
SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)SSC-Enthusiastic (179 reputation)

Group: General Forum Members
Points: 179 Visits: 398
Thanks a lot,

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


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search