• We have lots tickets with MS re AlwaysOn

    even you leave the current status for them remote in to investigate, they will say not enough information.

    Here are my summary to fix Alwayson.

    1. ALTER DATABASE [DatabaseName] SET HADR RESUME;

    If it doesn't work see below.

    2. Change sync mode

    USE [master]

    GO

    ALTER AVAILABILITY GROUP [AG]

    MODIFY REPLICA ON N'SQLServer\INSTANCE3' WITH (AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT)

    GO

    USE [master]

    GO

    ALTER AVAILABILITY GROUP [AG]

    MODIFY REPLICA ON N'SQLServer\INSTANCE3' WITH (AVAILABILITY_MODE = SYNCHRONOUS_COMMIT)

    GO

    If still not working, try 3:

    3. remove db from AG, then add it back.

    ALTER DATABASE [DatabaseName] SET HADR OFF;

    GO

    alter database [DatabaseName] set HADR AVAILABILITY GROUP = [AG]

    go

    If 3 still not work, rebuild the AG, 4:

    4. Drop database and restore from scratch.

    ALTER DATABASE [DatabaseName] SET HADR OFF;

    GO

    drop database [OdysseyXXXYYY]

    restore database DatabaseName from disk = '\Restored\DatabaseName' with norecovery

    restore log DatabaseName from disk = 'Restored\DatabaseName_latest.trn' with norecovery

    join the database to AG now.