Share via

SQL Server stops when role is changed

Dennis Burgess 1 Reputation point
2022-03-09T13:16:51.68+00:00

I have a pair of Windows 2019 Servers running 2019 Enterprise Edition SQL ..
They are currently configured in a Always on role one primary and one backup. Failover works fine ..

So lets go though what happened last night:

SQL Server 1 had a windows update, it ran and rebooted. This caused SQL2 to become active and everything failed over without issues.
When SQL1 came back up, SQL is set to manual (something is setting this as I have changed it a number of times), and SQL1 never starts, therefore no failback can occur.
When I go to cluster manager and tell it to select the best possible node (after starting SQL1 services and verifying they are replicated and synced), then it failback to SQL1, but then SQL2 services are stopped.

My assumption is that i missed an item or something in the Custer configuration, but i don't know what and don't know how to fix it .. suggestions....

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

5 answers

Sort by: Most helpful
  1. Tom Phillips 17,786 Reputation points
    2022-03-10T12:44:58.21+00:00

    With your answers to Erland's questions, you do have "Availability Groups".

    The cluster service still controls when the services start/stop. You need to look at the cluster log, it will tell you why SQL1 did not start when the server rebooted.

    Was this answer helpful?

    0 comments No comments

  2. YufeiShao-msft 7,156 Reputation points
    2022-03-10T09:21:57.077+00:00

    Hi @Dennis Burgess ,

    This blog said if stop SQL Service manually on primary replica, it fails over to second node only once, any further attempts of stopping SQL Server would not cause failover,
    https://dba.stackexchange.com/questions/151122/always-on-ag-is-down-when-service-is-stopped

    Whether you configure quorum modes, it can monitor overall cluster health and maxmize node-level fault tolerance
    https://learn.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/wsfc-quorum-modes-and-voting-configuration-sql-server?view=sql-server-ver15

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

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  3. Dennis Burgess 1 Reputation point
    2022-03-09T15:19:53.913+00:00

    We have databases that are NOT going to our second SQL2 server. So my assumption is it is database level.? Does this change things etc..

    Was this answer helpful?


  4. Dennis Burgess 1 Reputation point
    2022-03-09T13:44:18.353+00:00

    Then what is always on for?

    I want two identical systems running full database and always-on so that in the event on fails the other just takes over with little to no data loss. I have two disks one in each server capable of doing this. I want to have TWO SEPERATE copies of the data one on each server.

    Was this answer helpful?


  5. Tom Phillips 17,786 Reputation points
    2022-03-09T13:41:06.99+00:00

    In a true "fail over cluster", the disks are shared between the 2 nodes, and only 1 of the nodes services are ever running at a time. This is perfectly normal and expected behavior. The cluster service starts/stops the appropriate services during failover.

    https://learn.microsoft.com/en-us/sql/sql-server/failover-clusters/windows/windows-server-failover-clustering-wsfc-with-sql-server?view=sql-server-ver15#instance-level-high-availability-with-always-on-failover-cluster-instances

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.