Always On availability groups — Part 3

MSSQL-Feature-Image

How to change Failover Mode in GUI
1. Open SSMS, Connect to primary replica (DB01)
2. Expand “Always On High Availability” > Expand “Availability Groups” > Expand “AG1(Primary)” > Expand “Availability Replicas”
3. Right-Click “DB03(Secondary)” > “Properties”
4. In “Failover mode:”, change “Automatic” to “Manual” > Click “OK”

How to change Failover Mode in TSQL

Automatic Failover
1. It only work under Synchronous with automatic-failover mode

How to manual Failover in GUI
1. Open SSMS, Connect to primary replica (DB01)
2. Expand “Always On High Availability” > Expand “Availability Groups” > Right-Click “AG1(Primary)” > Expand “Availability Replicas”
3. Right-Click “DB03(Secondary)” > “Failover…”
4. In “Select New Primary Replica”, select “DB03” > Click “Next >”

How to manual Failover in TSQL

Force Failover with Possible Data Loss
1. Under asynchronous mode, all secondary databases are suspended after we failover
2. We need to resume in each secondary databases

How to force Failover in TSQL

How to resume suspended Database


How to connect to the availability group listener
1. Open SSMS, enter DNS name of availability group listener (AG1L.joeschoice.com) into “Server name:”
2. Verify the connection

How to connect to the availability group listener in non-default port
1. Open SSMS, enter DNS name of availability group listener and Port (AG1L.joeschoice.com,1433) into “Server name:”

Read-Only Routing
1. It is used to route incoming connections to read-only secondary replica
2. It is used to management incoming connections

How to configure Read-Only Routing
1. Setup READ_ONLY_ROUTING_URL in each read-only replica

2. Setup the Read Only Routing List on Primary Replica

How to configure load balancing Read-Only Routing
1. Setup READ_ONLY_ROUTING_URL in each read-only replica

2. Setup the Read Only Routing List on Primary Replica

How to configure of nested load balancing Read-Only Routing
1. Setup READ_ONLY_ROUTING_URL in each read-only replica

2. Setup the Read Only Routing List on Primary Replica

How to connect to Read-Only Routing
1. Open SSMS, Click “Options >>”, Select “Additional Connection Parameters”
2. Enter “ApplicationIntent=ReadOnly;MultiSubnetFailover=True;”
3. Clicl “Options <<“, enter DNS name of availability group listener (AG1L.joeschoice.com) into “Server name:”

Author: Joe Chan