Home Forums SQL Server 2005 Administering Automate SQL server restart in a clustered environment RE: Automate SQL server restart in a clustered environment<!-- 864 -->

  • John Mitchell-245523 (8/18/2014)


    I recommend you investigate the reasons behind your performance issue before implementing this workaround. If you must do it, you can control the cluster from a command line - see this. I'm sure there are equivalent PowerShell commands as well, if you prefer that.

    John

    Since this is Windows 2008, the cluster.exe documentation is useless. The Powershell commands are

    To import the Failovercluster Powershell module

    import-module failoverclusters

    List cluster groups

    get-clustergroup

    Stop a cluster group

    stop-clustergroup "groupname"

    Start a cluster group

    start-clustergroup "groupname"

    Rather than stopping the whole group just stop the SQL Server resource (takes the agent down too)

    Get the resources using

    get-clusterresource | ?{$_.resourcetype -match "SQL Server"}

    Stop the sql server resource using

    stop-clusterresource "sql server resource name"

    Start SQL server resource by starting the agent first

    start-clusterresource "sql agent resource name"

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉