Transactional Replication VS Availability Groups for Read Only Workloads
Posted by Rob Risetto on March 10, 2016
The Transactional Replication (TR) is still one of my favourite parts of SQL Server, and provides some distinctive advantages over Always On Availability Group (AG) Read Only secondaries. The TR advantages include :
- You don’t have to replicate everything when using TR, you can select tables, columns or even data subsets. You can also eliminate triggers, constraints and other definitions that add no value to a reporting implementation.
(Always On Availability Groups mirrors everything in the database) - TR sends deltas and therefore minimises data transfer traffic just like AG but TR has the flexibility of continuous or scheduled data transfers. AG mirroring has only continuous data transfer.
- TR allows you to move the reporting workload off to another server just like AG but
- TR is available in SQL Server Standard Edition
(AG is only available in the Enterprise Edition) - You can replicate to lower or higher edition/version of SQL Server instances
(AG secondary servers can only be Enterprise Edition and same version)
- TR is available in SQL Server Standard Edition
- When using TR, you can add reporting specific indexes directly to the replicated (slave) database. With AGs you have to add all indexes to the Primary database.
- When using TR, you can add extra reporting objects (eg Summary tables, stored procedures, views, functions) directly to the replicated database.
- When using TR, you can run maintenance (index rebuilds) on the primary server independently of the replicated database. I.e. It doesn’t send a mass of transaction log changes to the replicated database. In addition, when using TR, you can run index rebuilds on the replicated database without impacting the Primary server. However, the application of data changes may be delayed due to the contention with the index rebuilds on the replicated database.
- When using TR, you can configure database security on the replicated database independently of the primary database.
Spread the love
[…] Transactional Replication VS Availability Groups for Read Only Workloads Last modified: April 15, 2019 […]
good post, thanks! I would be interested in hearing your opinion of what advantages availability groups have over transactional replication.
Hi Ben,
AGs are the way to go if HA/DR is the primary requirement. Especially from SQL 2016 using Standard Edition you can create a Basic Availability Group.
A number of my clients that have SQL Enterprise Edition use a read only replica to feed reporting and data warehouse solutions. I find AGs easier to manage/support than Transactional Replication.
Generally schema updates are a non-issue for AG env where as you have to be more vigilant (in terms of customer change scripts) on how schema changes are made when using Transactional Replication.
regards
Rob