Share via

Azure SQL Database failover faillback

Ashwan 536 Reputation points
2023-08-09T07:04:18.0966667+00:00

hi guru

We have Azure SQL database and sitting on price tier Premium P1: 125 DTUs. We are in the process of testing failover and fail back scenarios . We have thing to clarify on

  1. how to check HA status
  2. How do we ensure failover has been done or successfully (I know azure logs can see ) I mean to say any server names has been changed?
  3. how to check the failover modes(manual /automatic )

thank you

Azure SQL Database

1 answer

Sort by: Most helpful
  1. Alberto Morillo 35,506 Reputation points MVP Volunteer Moderator
    2023-08-09T14:47:36.2666667+00:00

    Question #1: To monitor the HA status you can use below query. It shows replication lags and last replication time of secondary databases.

    SELECT   
         link_guid  
       , partner_server  
       , last_replication  
       , replication_lag_sec   
    FROM sys.dm_geo_replication_link_status;  
    
    
    

    Question #2: You can use the queries/tools I provided on this StackOverflow forum thread.

    Question #3. You can initiate a planned or unplanned failover usisng the always familiar Transact-SQL as explained here.

    Was this answer helpful?


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.