SQL Server 2014 AlwaysOn AG Failover
SQL Server 2014 AlwaysOn AG Failover
https://groups.yahoo.com/neo/groups/sqlserver-indo/info
Session Objectives
http://micha19.deviantart.com/art/let-s-cooking-manga-girl212148508
Instance level
Shared storage
Failover per instance
No active secondary
Support auto, transparent
failover
Database level
No shared storage
Failover per DB group
Active secondary (read only)
Support auto, transparent
failover
4
Secondary Server
Ticketing
CustomerDB
Ticketing
CustomerDB
Synchronous
Primary waits for notification from secondary before
committing transaction
Performance penalty
No data loss during failover
7
Ticketing
Primary Replica
CustomerDB
Primary Replica
Ticketing
Secondary Replica
Ticketing
Secondary Replica
CustomerDB
Secondary Replica
Readable Secondary
CustomerDB
Secondary Replica
Asynchronous
Availability Listener
SQLAG-LS
Demo
Planned Manual Failover
Failover Mode
Automatic
Require Synchronous mode
No data loss
Machine shutdown or service unavailable
Planned - Manual
Require Synchronous mode
No data loss
Use SSMS or T-SQL
Forced - Manual
Replicas are in asynchronous commit mode
Forced means: You can afford loosing data
Obviously, data loss is possible
10
failover
11
12
Demo
Automatic Failover
13
Planned - Manual
Patching OS or SQL Server
HA/DR exercise
Upgrading hardware
Forced - Manual
Real disaster happens failover to DR site
3 servers, but 2 machines in primary DC are down
There is no primary available in the configuration!
14
Availability Mode
Failover Mode
Role
KOMODOSQL1\SQL2014
Synchronous commit
Automatic
Primary
KOMODOSQL2\SQL2014
Synchronous commit
Automatic
Secondary
KOMODOSQL3\SQL2014
Asynchronous commit
Manual
Secondary
2)
Client still can access the primary as usual (but now there is no automatic pair)
3)
KOMODOSQL1\SQL2014 is down
4)
5)
6)
Your situation:
Primary and secondary in production are lost
You only have 1 node in DR, but it is in resolving state, inaccessible from client
16
17
Demo
Recovering from Resolving state
18
Q/A
19
Download my e-book
https://leanpub.com/sqlagindo
Work in progress, If You find typos
please email me
Visit my blog
Thank You
22