SQL always on maintenance mode

geradmin 1 Reputation point
2021-04-26T13:19:34.797+00:00

Hi,

i have 2 sql 2016 standard with some DB configured with basic always on availability.

So, next weekend the electricity will be disconnected for 2 days and i need to poweroff all server.

Since it is the first time that this happens to me, what's the correct procedure to put the 2 sql server on maintence and power off?

I will need to pause the alwayson, suspend the cluster service on replica sql server ( Suspend-ClusterNode) and power off it and then power off the first sql server? right?

thanks

Andrea

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,492 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AmeliaGu-MSFT 14,006 Reputation points Microsoft External Staff
    2021-04-27T07:10:14.247+00:00

    Hi geradmin-6282,
    Welcome to Microsoft Q&A.

    I will need to pause the alwayson, suspend the cluster service on replica sql server ( Suspend-ClusterNode) and power off it and then power off the first sql server? right?

    We can suspend the data movement for the primary replica.

    ALTER DATABASE database_name SET HADR SUSPEND;  
    

    After maintenance, we can resume a suspended availability database to make it work again.

    ALTER DATABASE database_name SET HADR RESUME;  
    

    Please refer to this article which might help.

    For Windows failover cluster, if you need to perform extensive diagnosis or maintenance on cluster nodes, it might be more workable to stop (not pause) the Cluster service on the nodes. Please refer to Stop-ClusterNode which might help.

    Best Regards,
    Amelia


    If the answer is helpful, please click "Accept Answer" and upvote it.
    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.

    0 comments No comments

Your answer

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