question

rohits avatar image
rohits asked

Restart SQL Server Service in SQL Server Cluster

Hello, I wanted to restart SQL Server Service through command line interface, I have SQL Server configured in clustered environment. When I am restarting the services through "net stop MSSQLSERVER" or powershell command line "Stop-Service -name MSSQLSERVER -force" the services are stopping and shifting to another node. Can I get some help on that?? Rohit
sql serverclustercommand-line
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi. What is your problem? If you stop a cluster aware service then to expected result is for the other node to take control....
0 Likes 0 ·
@rohits If you are trying to restart the service then why are you just stopping it? Via command line you should probably consider using net stop MSSQLSERVER && net start MSSQLSERVER If you are using PS then you could use this: Restart-Service -name MSSQLSERVER -force
0 Likes 0 ·

1 Answer

·
rohits avatar image
rohits answered
Thanks for your answers, I got the solution restarting SQL server resource in Fail-over Cluster through Powershell. The script is: import-module FailoverClusters Stop-ClusterResource -Cluster NTBB0VSS -Name "SQL Server" Start-ClusterResource -Cluster NTBB0VSS -Name "SQL Server" Start-ClusterResource -Cluster NTBB0VSS -Name "SQL Server Agent" Thanks, Rohit
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.