Advertisement
Beginner SQL Server, Always On Availability Groups

What is the difference between the primary replica and secondary replicas in an Always On Availability Group?

Short answer

The primary replica is the active database that handles all the read and write operations from your applications, while secondary replicas hold a continuously updated copy of that data and can optionally be used for read only reporting queries, backups, or as a standby ready to…

Save SQL Server mock interview
Advertisement
AModel answer
The primary replica is the active database that handles all the read and write operations from your applications, while secondary replicas hold a continuously updated copy of that data and can optionally be used for read only reporting queries, backups, or as a standby ready to take over if the primary fails.
Example

-- Read only routing lets reporting queries run against a secondary replica -- instead of adding extra load to the primary

Real-world example
A company offloads its heavy reporting queries to a secondary replica, keeping the primary replica free to handle the application's regular transactional workload without slowing down.
Likely follow-ups
  • Can you write data directly to a secondary replica?
  • How much delay is typical between the primary and a secondary replica?
Related topics