question

geradmin-5136 avatar image
0 Votes"
geradmin-5136 asked Cathyji-msft edited

sql 2016 alwayson question about failover

Hi guys, i have this question. we have 2 sql 2016 standard with some databases replicated with basic alwayson. So last night the primary server crashed (BSOD and reboot) and the secondary sql has started the failover. This morning i have done a manual failover to move again the DB on primary server. i have a doubt, the manual failover need to be done from the sql with primary replica? or from the sql with secondary replica? or doesn't matter? thanks Andrea

sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

RobbieVarn-7255 avatar image
0 Votes"
RobbieVarn-7255 answered

You can initiate a manual failover from either the Primary or Secondary. I prefer the Primary in order to see the AG dashboard show correct information.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

geradmin-5136 avatar image
0 Votes"
geradmin-5136 answered Shashank-Singh commented

hi, thanks for reply

from your experience after the failback (with option "replica with no data loss") is useful run a checkdb for this database?

cheers

Andrea

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

No you do not. You should run checkdb as per schedule you have planned, its not necessary to run checksb just because you did failover

0 Votes 0 ·
Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft edited

Hi @geradmin-5136,

i have a doubt, the manual failover need to be done from the sql with primary replica?

You can do manual failover on primary replica or secondary replica. Before manual failover, please make sure the primary replica and the target secondary replica are running in synchronous-commit mode and are currently synchronized.

after the failback (with option "replica with no data loss") is useful run a checkdb for this database

As Shashank mentioned, suggest you do not do that. DBCC CHECKDB is an IO intensive operation, this operation will have some performance implications. After failover, suggest you using AG dashboard to check the AG state.


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



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

geradmin-5136 avatar image
0 Votes"
geradmin-5136 answered Cathyji-msft edited

Hi, yes when i did the failback on wizard's windows the state of replica was green. To be sure I ran the integrity check anyway, the DB the wa have is small, the biggest is 50GB and the checkdb has took 10 minutes.

thanks

Andrea

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @geradmin-5136,

Thanks for your reply.

By the way, If the response helped, do "Accept Answer". By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

0 Votes 0 ·