Designing High Availability Database Solutions Using Microsoft Sql Server 2012
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
- Feedback
- Edit
Always On availability groups: a high-availability and disaster-recovery solution
- Article
- 7 minutes to read
Thank you.
Applies to: SQL Server (all supported versions)
The Always On availability groups feature is a high-availability and disaster-recovery solution that provides an enterprise-level alternative to database mirroring. Introduced in SQL Server 2012 (11.x), Always On availability groups maximizes the availability of a set of user databases for an enterprise. An availability group supports a failover environment for a discrete set of user databases, known as availability databases, that fail over together. An availability group supports a set of read-write primary databases and one to eight sets of corresponding secondary databases. Optionally, secondary databases can be made available for read-only access and/or some backup operations.
An availability group fails over at the level of an availability replica. Failovers are not caused by database issues such as a database becoming suspect due to a loss of a data file, deletion of a database, or corruption of a transaction log.
Note
Always On availability groups is the full, formal name for this availability feature. The abbreviation is AG, not AOAG or AAG.
Benefits
Always On availability groups provides a rich set of options that improve database availability and that enable improved resource use. The key components are as follows:
-
Supports up to nine availability replicas. An availability replica is an instantiation of an availability group that is hosted by a specific instance of SQL Server and maintains a local copy of each availability database that belongs to the availability group. Each availability group supports one primary replica and up to eight secondary replicas. For more information, see Overview of Always On Availability Groups (SQL Server).
-
Supports alternative availability modes, as follows:
-
Asynchronous-commit mode. This availability mode is a disaster-recovery solution that works well when the availability replicas are distributed over considerable distances.
-
Synchronous-commit mode. This availability mode emphasizes high availability and data protection over performance, at the cost of increased transaction latency. A given availability group can support up to five synchronous-commit availability replicas, including the current primary replica.
For more information, see Availability Modes (Always On Availability Groups).
SQL Server 2019 (15.x) increases the maximum number of synchronous replicas to 5, up from 3 in SQL Server 2017 (14.x). You can configure this group of five replicas to have automatic failover within the group. There is one primary replica, plus four synchronous secondary replicas.
-
-
Supports several forms of availability-group failover: automatic failover, planned manual failover (generally referred as simply "manual failover"), and forced manual failover (generally referred as simply "forced failover"). For more information, see Failover and Failover Modes (Always On Availability Groups).
-
Enables you to configure a given availability replica to support either or both of the following active-secondary capabilities:
-
Read-only connection access which enables read-only connections to the replica to access and read its databases when it is running as a secondary replica. For more information, see Active Secondaries: Readable Secondary Replicas (Always On Availability Groups).
-
Performing backup operations on its databases when it is running as a secondary replica. For more information, see Active Secondaries: Backup on Secondary Replicas (Always On Availability Groups).
Using active secondary capabilities improves your IT efficiency and reduce cost through better resource utilization of secondary hardware. In addition, offloading read-intent applications and backup jobs to secondary replicas helps to improve performance on the primary replica.
-
-
Supports an availability group listener for each availability group. An availability group listener is a server name to which clients can connect in order to access a database in a primary or secondary replica of an Always On availability group. Availability group listeners direct incoming connections to the primary replica or to a read-only secondary replica. The listener provides fast application failover after an availability group fails over. For more information, see Availability Group Listeners, Client Connectivity, and Application Failover (SQL Server).
-
Supports a flexible failover policy for greater control over availability-group failover. For more information, see Failover and Failover Modes (Always On Availability Groups).
-
Supports automatic page repair for protection against page corruption. For more information, see Automatic Page Repair (Availability Groups: Database Mirroring).
-
Supports encryption and compression, which provide a secure, high performing transport.
-
Provides an integrated set of tools to simplify deployment and management of availability groups, including:
-
Transact-SQL DDL statements for creating and managing availability groups. For more information, see Overview of Transact-SQL Statements for Always On Availability Groups (SQL Server).
-
SQL Server Management Studio tools, as follows:
-
The New Availability Group Wizard creates and configures an availability group. In some environments, this wizard can also automatically prepare the secondary databases and start data synchronization for each of them. For more information, see Use the New Availability Group Dialog Box (SQL Server Management Studio).
-
The Add Database to Availability Group Wizard adds one or more primary databases to an existing availability group. In some environments, this wizard can also automatically prepare the secondary databases and start data synchronization for each of them. For more information, see Use the Add Database to Availability Group Wizard (SQL Server).
-
The Add Replica to Availability Group Wizard adds one or more secondary replicas to an existing availability group. In some environments, this wizard can also automatically prepare the secondary databases and start data synchronization for each of them. For more information, see Use the Add Replica to Availability Group Wizard (SQL Server Management Studio).
-
The Fail Over Availability Group Wizard initiates a manual failover on an availability group. Depending on the configuration and state of the secondary replica that you specify as the failover target, the wizard can perform either a planned or forced manual failover. For more information, see Use the Fail Over Availability Group Wizard (SQL Server Management Studio).
-
-
The Always On Dashboard monitors Always On availability groups, availability replicas, and availability databases and evaluates results for Always On policies. For more information, see Use the Always On Dashboard (SQL Server Management Studio).
-
The Object Explorer Details pane displays basic information about existing availability groups. For more information, see Use the Object Explorer Details to Monitor Availability Groups (SQL Server Management Studio).
-
PowerShell cmdlets. For more information, see Overview of PowerShell Cmdlets for Always On Availability Groups (SQL Server).
-
Terms and Definitions
availability group
A container for a set of databases, availability databases, that fail over together.
availability database
A database that belongs to an availability group. For each availability database, the availability group maintains a single read-write copy (the primary database) and one to eight read-only copies (secondary databases).
primary database
The read-write copy of an availability database.
secondary database
A read-only copy of an availability database.
availability replica
An instantiation of an availability group that is hosted by a specific instance of SQL Server and maintains a local copy of each availability database that belongs to the availability group. Two types of availability replicas exist: a single primary replica and one to eight secondary replicas.
primary replica
The availability replica that makes the primary databases available for read-write connections from clients and, also, sends transaction log records for each primary database to every secondary replica.
secondary replica
An availability replica that maintains a secondary copy of each availability database, and serves as a potential failover targets for the availability group. Optionally, a secondary replica can support read-only access to secondary databases can support creating backups on secondary databases.
availability group listener
A server name to which clients can connect in order to access a database in a primary or secondary replica of an Always On availability group. Availability group listeners direct incoming connections to the primary replica or to a read-only secondary replica.
Interoperability and Coexistence with Other Database Engine Features
Always On availability groups can be used with the following features or components of SQL Server:
-
About Change Data Capture (SQL Server)
-
About Change Tracking (SQL Server)
-
Contained databases
-
Database encryption
-
Database snapshots
-
FILESTREAM
-
FileTable
-
Log shipping
-
Remote Blob Store (RBS)
-
Replication
-
Service Broker
-
SQL Server Agent
-
Reporting Services
- Getting Started with Always On Availability Groups (SQL Server)
Related Content
-
Blogs:
SQL Server Always On Team Blogs: The official SQL Server Always On Team Blog
CSS SQL Server Engineers Blogs
-
Whitepapers:
Microsoft SQL Server Always On Solutions Guide for High Availability and Disaster Recovery
Microsoft White Papers for SQL Server 2012
SQL Server Customer Advisory Team Whitepapers
See Also
Overview of Always On Availability Groups (SQL Server)
Prerequisites, Restrictions, and Recommendations for Always On Availability Groups (SQL Server)
Configuration of a Server Instance for Always On Availability Groups (SQL Server)
Creation and Configuration of Availability Groups (SQL Server)
Administration of an Availability Group (SQL Server)
Monitoring of Availability Groups (SQL Server)
Overview of Transact-SQL Statements for Always On Availability Groups (SQL Server)
Overview of PowerShell Cmdlets for Always On Availability Groups (SQL Server)
Feedback
Designing High Availability Database Solutions Using Microsoft Sql Server 2012
Source: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/always-on-availability-groups-sql-server
0 Response to "Designing High Availability Database Solutions Using Microsoft Sql Server 2012"
Post a Comment