Auto failover on alwasyon asynchronous

  • Currently we are using SQL Server 2014 Enterprise version. Due to OLTP database we created Always-On on asynchronous manual failover.

    We still want to continue on asynchronous mode but we need automatic failover. I know I am asking bit crazy question, but I want to check if there is any possibility through a PowerShell scripts or any other ways to do this, so that when ever primary goes down on Always-On, I want the secondary to become primary automatically.

    Please provide your inputs.

    Thanks, Ven

  • Sure, you can send a command to force a failover. That's the easy part. The hard part is that you're going to have to constantly poll the database to see if it's online and available. You do know that if you force a failover under these circumstances you're looking at the possibility of data loss, right? Here's the documentation on forced failover. It's not hard to do.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • mssqlchat - Friday, March 3, 2017 2:16 AM

    Currently we are using SQL Server 2014 Enterprise version. Due to OLTP database we created Always-On on asynchronous manual failover.

    We still want to continue on asynchronous mode but we need automatic failover. I know I am asking bit crazy question, but I want to check if there is any possibility through a PowerShell scripts or any other ways to do this, so that when ever primary goes down on Always-On, I want the secondary to become primary automatically.

    Please provide your inputs.

    Thanks, Ven

    Auto failover is not available for the exact reason that the databases are not necessarily synchronised.
    If theyre not synchronised then data loss will occur.

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

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

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply