You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: support/sql/database-engine/replication/subscription-exists-linux-containers-transactional.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,36 +6,37 @@ ms.custom: sap:Replication, Change Tracking, Change Data Capture\Errors or unexp
6
6
ms.date: 11/03/2025
7
7
---
8
8
9
-
# Configuring transactional replication on multiple SQL Server Linux containers fails
9
+
# Configuring transactional replication fails on multiple SQL Server Linux containers
10
10
11
-
This article provides troubleshooting guidance for an issue that might occur when configuring two SQL Servers running in Linux containers on the same machine as replication subscribers.
11
+
This article provides troubleshooting guidance for an issue that occurs when you configure two Microsoft SQL Server-based servers that run in Linux containers on the same computer as replication subscribers.
12
12
13
13
## Symptoms
14
14
15
-
When configuring **Transactional Replication** on SQL Server 2022 running in Linux containers, you might encounter the following error message:
15
+
When you configure **Transactional Replication** on SQL Server 2022 running in Linux containers, you receive the following error message:
16
16
17
17
> The subscription already exists.
18
18
19
19
This issue usually occurs when:
20
20
21
-
- Two SQL Server instances are hosted in separate containers on the same Linux machine.
21
+
- Two SQL Server instances are hosted in separate containers on the same Linux-based computer.
22
22
- Both instances are added as subscribers to the same publisher.
23
23
- The connection strings use the same hostname but different port numbers (for example, `LINUXHOST,5455` and `LINUXHOST,5465`).
24
24
25
25
## Cause
26
26
27
-
The issue occurs because subscriber metadata doesn't honor port numbers during persistence. Only the hostname is stored, causing the second subscriber to be seen as a duplicate of the first.
28
-
This behavior is specific to Linux container environments where named instances don't exist and connections rely on hostname and port mapping.
27
+
This issue occurs because subscriber metadata doesn't honor port numbers during persistence. Only the hostname is stored. This behavior causes the second subscriber to be seen as a duplicate of the first.
28
+
29
+
This behavior is specific to Linux container environments in which named instances don't exist and connections rely on hostname and port mapping.
29
30
30
31
## Workaround
31
32
32
-
To successfully add multiple subscribers on the same machine but in different containers, follow these steps:
33
+
To successfully add multiple subscribers on the same computer but in different containers, follow these steps:
33
34
34
35
1. Install [Cumulative Update 20 (CU20) for SQL Server 2022](https://www.catalog.update.microsoft.com/Search.aspx?q=KB5059390).
35
36
36
37
1. Enable trace flag [15005](/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql#tf15005). This trace flag enables using a subscriber with a nondefault port for transactional replication.
37
38
38
-
1. Perform the following manual cleanup and configuration steps in Transact-SQL. Replace the `@hostname`, `@port_sub1`, `@port_sub2`, `@PublicationName`, `@SubscriberDb_Sub1`, and `@SubscriberDb_Sub2` variables with values specific to your environment:
39
+
1. Perform the following manual cleanup and configuration steps in Transact-SQL. In this script, replace the `@hostname`, `@port_sub1`, `@port_sub2`, `@PublicationName`, `@SubscriberDb_Sub1`, and `@SubscriberDb_Sub2` variables with values that are specific to your environment:
39
40
40
41
```sql
41
42
DECLARE @hostname AS SYSNAME ='LinuxSubscriberHostName',
@@ -166,9 +167,9 @@ To successfully add multiple subscribers on the same machine but in different co
166
167
167
168
## Resolution
168
169
169
-
Currently, no permanent fix is available. Use the previous [workaround](#workaround).
170
+
Currently, no permanent fix is available. Instead, see the ["Workaround"](#workaround) section.
170
171
171
-
The product team is evaluating potential fixes for future releases. This article will be updated when a permanent fix is available.
172
+
The product team is evaluating potential fixes for future releases. This article will be updated when a solution becomes available.
0 commit comments