Skip to content

Commit b7162bb

Browse files
authored
Pre-conference style edits (#35624)
1 parent 64cc9db commit b7162bb

31 files changed

Lines changed: 443 additions & 383 deletions

docs/database-engine/availability-groups/windows/prereqs-restrictions-recommendations-always-on-availability.md

Lines changed: 13 additions & 13 deletions
Large diffs are not rendered by default.
Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,43 @@
11
---
2-
title: "Failed availability group add-file operation"
2+
title: Failed Availability Group Add-File Operation
33
description: Troubleshoot failed add-file operations in an Always On availability group. File paths can differ between systems that host the primary and secondary replicas.
44
author: MashaMSFT
55
ms.author: mathoma
6-
ms.date: "05/17/2016"
6+
ms.reviewer: randolphwest
7+
ms.date: 10/21/2025
78
ms.service: sql
89
ms.subservice: availability-groups
910
ms.topic: troubleshooting
1011
helpviewer_keywords:
1112
- "secondary databases [SQL Server], Availability Groups"
1213
- "Availability Groups [SQL Server], troubleshooting"
1314
---
14-
# Troubleshoot a Failed Add-File Operation (Always On Availability Groups)
15+
# Troubleshoot a failed add-file operation (Always On availability groups)
16+
1517
[!INCLUDE [SQL Server](../../../includes/applies-to-version/sqlserver.md)]
1618

17-
In some Always On availability group deployments, file paths differ between the system that hosts the primary replica and systems that host a secondary replica. If the file path of an add-file operation does not exist on a secondary replica, the add-file operation will succeed on the primary database. But the add-file operation will cause the secondary database to be suspended. This, in turn, causes the secondary replica to enter the NOT SYNCHRONIZING state.
18-
19+
In some Always On availability group deployments, file paths differ between the system that hosts the primary replica and systems that host a secondary replica. If the file path of an add-file operation doesn't exist on a secondary replica, the add-file operation will succeed on the primary database. But the add-file operation will cause the secondary database to be suspended. This, in turn, causes the secondary replica to enter the `NOT SYNCHRONIZING` state.
20+
1921
> [!NOTE]
20-
> We recommend that, if possible, the file path (including the drive letter) of a given secondary database be identical to the path of the corresponding primary database.
21-
22-
## Problem Resolution
23-
To resolve this problem the database owner must complete the following steps:
24-
25-
1. Remove the secondary database from the availability group. For more information, see [Remove a Secondary Database from an Availability Group (SQL Server)](../../../database-engine/availability-groups/windows/remove-a-secondary-database-from-an-availability-group-sql-server.md).
26-
27-
2. On the existing secondary database, restore a full backup of the filegroup that contains the added file to the secondary database, using WITH NORECOVERY and WITH MOVE (specifying the file path on the server instance that hosts the secondary replica). For more information, see [Restore a Database to a New Location (SQL Server)](../../../relational-databases/backup-restore/restore-a-database-to-a-new-location-sql-server.md).
28-
29-
3. Back up the transaction log that contains the add-file operation on the primary database, and manually restore the log backup on the secondary database using WITH NORECOVERY and WITH MOVE.
30-
31-
4. Prepare the secondary database for re-joining the availability group, by restoring, WITH NO RECOVERY, any other outstanding log backups from the primary database.
32-
33-
5. Rejoin the secondary database to the availability group. For more information, see [Join a Secondary Database to an Availability Group (SQL Server)](../../../database-engine/availability-groups/windows/join-a-secondary-database-to-an-availability-group-sql-server.md).
34-
35-
## See Also
36-
[Overview of Always On Availability Groups (SQL Server)](../../../database-engine/availability-groups/windows/overview-of-always-on-availability-groups-sql-server.md)
37-
[Manually Prepare a Secondary Database for an Availability Group (SQL Server)](../../../database-engine/availability-groups/windows/manually-prepare-a-secondary-database-for-an-availability-group-sql-server.md)
38-
[Troubleshoot Orphaned Users (SQL Server)](../../../sql-server/failover-clusters/troubleshoot-orphaned-users-sql-server.md)
39-
[Troubleshoot Always On Availability Groups Configuration (SQL Server)](../../../database-engine/availability-groups/windows/troubleshoot-always-on-availability-groups-configuration-sql-server.md)
22+
> If possible, the file path (including the drive letter) of a given secondary database should be identical to the path of the corresponding primary database.
23+
24+
## Problem resolution
25+
26+
To resolve this problem the database owner must complete the following steps:
27+
28+
1. Remove the secondary database from the availability group. For more information, see [Remove a Secondary Database from an Availability Group (SQL Server)](remove-a-secondary-database-from-an-availability-group-sql-server.md).
29+
30+
1. On the existing secondary database, restore a full backup of the filegroup that contains the added file to the secondary database, using WITH `NORECOVERY` and `WITH MOVE` (specifying the file path on the server instance that hosts the secondary replica). For more information, see [Restore a database to a new location (SQL Server)](../../../relational-databases/backup-restore/restore-a-database-to-a-new-location-sql-server.md).
31+
32+
1. Back up the transaction log that contains the add-file operation on the primary database, and manually restore the log backup on the secondary database using WITH `NORECOVERY` and `WITH MOVE`.
33+
34+
1. Prepare the secondary database for re-joining the availability group, by restoring, `WITH NO RECOVERY`, any other outstanding log backups from the primary database.
35+
36+
1. Rejoin the secondary database to the availability group. For more information, see [Join a secondary database to an Always On availability group](join-a-secondary-database-to-an-availability-group-sql-server.md).
37+
38+
## Related content
39+
40+
- [What is an Always On availability group?](overview-of-always-on-availability-groups-sql-server.md)
41+
- [Prepare a secondary database for an Always On availability group](manually-prepare-a-secondary-database-for-an-availability-group-sql-server.md)
42+
- [Troubleshoot orphaned users (SQL Server)](../../../sql-server/failover-clusters/troubleshoot-orphaned-users-sql-server.md)
43+
- [Troubleshoot Always On Availability Groups Configuration (SQL Server)](troubleshoot-always-on-availability-groups-configuration-sql-server.md)

0 commit comments

Comments
 (0)