Locked Backup Priority On AlwaysOn Feature

  • Friday, November 11, 2011 9:32 AM
     
     

    Hi All,

    I have the below set up.

    Availability Group Name: AlwaysOnAVG
    Databases: AlwaysOnDB1 & ALwaysOnDB2
    Availability Group Listener Name: AlwaysOnAVG_Listener

    Servers                 current Role    Behaviour in Secondary
    AlwaysOn1          PRIMARY         Allow ReadOnly Intent Connections
    AlwaysOn2          Secondary       Allow ReadOnly Intent Connections (Synchronous, automatic failover mode)
    AlwaysOn3         Secondary        Allow ReadOnly Intent Connections (Synchronous, ASynchronous, High Safety Mode)

    I have defined the backup priority as shown below.

    ALTER AVAILABILITY GROUP AlwaysOnAVG SET (AUTOMATED_BACKUP_PREFERENCE=SECONDARY_ONLY)

     ALTER AVAILABILITY GROUP AlwaysOnAVG MODIFY REPLICA ON 'AlwaysOn1' WITH (BACKUP_PRIORITY=3)
    ALTER AVAILABILITY GROUP AlwaysOnAVG MODIFY REPLICA ON 'AlwaysOn2' WITH (BACKUP_PRIORITY=1)
    ALTER AVAILABILITY GROUP AlwaysOnAVG MODIFY REPLICA ON 'AlwaysOn3' WITH (BACKUP_PRIORITY=2)

    When i run the below command, its returning 1 (prefered node) on ALwaysOn1 insatnce while 0(Not prefered) on Other instances. It should be 0 on AlwaysOn1 & 1 on AlwaysOn2.

    select sys.fn_hadr_backup_is_preferred_replica('AlwaysOnDB1') as PreferedReplica

    Please help me in fixing the above issue.

    Thanks

     

     


    • Edited by Gnreddy Friday, November 11, 2011 9:41 AM
    •  

All Replies

  • Friday, November 11, 2011 8:59 PM
     
     

    There was a bug in that code which could account for that.

    Which build/CTP are you running?


    Microsoft SQL Server Storage Engine PM
  • Monday, November 14, 2011 12:23 PM
     
     
    I am using Denali CTP3 (11.0.1440.19)
  • Monday, November 14, 2011 6:46 PM
     
     Answered

    That build does have the bug I'm thinking of.

    We'll be putting out a Release Candidate very soon which will have it fixed.


    Microsoft SQL Server Storage Engine PM
    • Marked As Answer by Gnreddy Tuesday, November 15, 2011 4:35 AM
    •  
  • Tuesday, November 15, 2011 2:20 AM
     
     

    Ok Kevin,, Thanks