Skip to content

Commit 73007d2

Browse files
authored
Merge pull request #36293 from rwestMSFT/rw-0119-fix-10269
Refresh Database snapshots with Always On availability groups (PR 10269)
2 parents e08a249 + 2d10e3b commit 73007d2

1 file changed

Lines changed: 28 additions & 24 deletions

File tree

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
title: "Create a database snapshot for an availability group"
2+
title: "Create a Database Snapshot for an Availability Group"
33
description: "Describes how to create a database snapshot for a database within an Always On availability group on either the primary or secondary database."
44
author: MashaMSFT
55
ms.author: mathoma
6-
ms.date: "05/17/2016"
6+
ms.reviewer: randolphwest
7+
ms.date: 01/19/2026
78
ms.service: sql
89
ms.subservice: availability-groups
910
ms.topic: how-to
@@ -12,27 +13,30 @@ helpviewer_keywords:
1213
- "database snapshots [SQL Server], Always On Availability Groups"
1314
- "Availability Groups [SQL Server], interoperability"
1415
---
15-
# Database Snapshots with Always On Availability Groups (SQL Server)
16+
# Database snapshots with Always On availability groups (SQL Server)
17+
1618
[!INCLUDE [SQL Server](../../../includes/applies-to-version/sqlserver.md)]
1719

18-
[!NOTE] Creating database snapshots on any database has cpu and IO overhead due to copy on write activity. On database replicas, this can hurt redo throughput among other operations, especially as the number of snapshots increases.
19-
20-
You can create a database snapshot on an primary or secondary database in an availability group. The replica role must be either PRIMARY or SECONDARY, not in the RESOLVING state.
21-
22-
We recommend that the database synchronization state be SYNCHRONIZING or SYNCHRONIZED when you create a database snapshot. However, database snapshots can be created when the database synchronization state is NOT SYNCHRONIZING.
23-
24-
A database snapshot on a secondary replica should continue to work if the replica is DISCONNECTED from the primary replica.
25-
26-
Some [!INCLUDE[ssHADR](../../../includes/sshadr-md.md)] conditions cause both the source database and its database snapshots to be restarted, temporarily disconnecting users. These conditions are as follows:
27-
28-
- The primary replica changes roles, whether because the current primary replica goes off line and comes back online on the same server instance or because the availability group fails over.
29-
30-
- The database enters the secondary role.
31-
32-
If the availability replica that hosts database snapshots is failed over, the database snapshots remain on the server instance where they were created. Users can continue to use the snapshots after the failover.If performance is a concern in your environment, we recommend that you create database snapshots only on secondary databases that are hosted by a secondary replica that is configured for manual failover mode. If you ever manually fail over the availability group to this secondary replica, you can create a new set of database snapshots on another secondary replica, redirect clients to the new database snapshots, and drop all of the database snapshots from the now primary databases.
33-
34-
## See Also
35-
[Overview of Always On Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)
36-
[Database Snapshots (SQL Server)](../../../relational-databases/databases/database-snapshots-sql-server.md)
37-
38-
20+
You can create a database snapshot on a primary or secondary database in an availability group. The replica role must be either `PRIMARY` or `SECONDARY`, and can't be in the `RESOLVING` state.
21+
22+
> [!NOTE]
23+
> Creating database snapshots on any database adds CPU and I/O overhead because of copy-on-write activity. On database replicas, this overhead can reduce redo throughput and affect other operations, especially as the number of snapshots increases.
24+
25+
You should create database snapshots when the database synchronization state is `SYNCHRONIZING` or `SYNCHRONIZED`. However, you can still create database snapshots when the database synchronization state is `NOT SYNCHRONIZING`.
26+
27+
A database snapshot on a secondary replica continues to work if the replica is `DISCONNECTED` from the primary replica.
28+
29+
Some [!INCLUDE [ssHADR](../../../includes/sshadr-md.md)] conditions cause both the source database and its database snapshots to restart, temporarily disconnecting users. These conditions are as follows:
30+
31+
- The primary replica changes roles. This change can happen because the current primary replica goes offline and comes back online on the same server instance, or because the availability group fails over.
32+
33+
- The database enters the secondary role.
34+
35+
If the availability replica that hosts database snapshots fails over, the database snapshots remain on the server instance where you created them. You can continue to use the snapshots after the failover. If performance is a concern in your environment, create database snapshots only on secondary databases hosted by a secondary replica that is configured for manual failover mode.
36+
37+
If you ever manually fail over the availability group to this secondary replica, you can create a new set of database snapshots on another secondary replica, redirect clients to the new database snapshots, and drop all of the database snapshots from the now primary databases.
38+
39+
## Related content
40+
41+
- [What is an Always On availability group?](overview-of-always-on-availability-groups-sql-server.md)
42+
- [Database snapshots (SQL Server)](../../../relational-databases/databases/database-snapshots-sql-server.md)

0 commit comments

Comments
 (0)