High Availability (HA) in SQL Server
Last Updated :
24 Sep, 2020
Improve
It is the solution or process or technology to make the service or application or database availability 24x7 and 100% through needless and fault-tolerant components at the same location under either planned or unplanned outages.
There are mainly five options in MS SQL Server to setup high availability solution for the databases:
- Replication
- Log Shipping
- Mirroring
- Clustering (Failover Cluster)
- AlwaysON Availability Groups (AG)
- Snapshot replication
- Transactional replication
- Merge replication
- Peer to Peer replication
- Transactional : Transactional replication begins with a snapshot of the publisher database that's applied to the subscriber. Once the snapshot is in place all transactions that occur on the publisher are going to be replicated to the subscriber.
- Merge : Merge replication begins with a snapshot of the publisher database that's applied to the subscriber. Changes made at the publisher and subscriber are shadowed offline. Once the publisher and subscriber are back online simultaneously, the subscriber synchronizes with the publisher and the other way around.
- Peer to Peer : Peer to Peer replication is often used as transactions occur they're executed on all of the nodes involved in replication in order to keep the data in sync in near real time.
- Active/Active : When running in Active/Active mode, SQL Server is running actively on both servers. If one among the SQL Server's fail then the opposite SQL Server will fail-over.
- Active/Passive : When running in Active/Passive mode, SQL Server runs on one server while the opposite server waits just in case of a failure. This can be the foremost popular choice because it doesn't affect performance.