Skip to content

Commit 3117d13

Browse files
committed
manual updates
1 parent 00b22bf commit 3117d13

1 file changed

Lines changed: 16 additions & 20 deletions

File tree

support/sql/database-engine/replication/subscription-exists-linux-containers-transactional.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,41 @@
11
---
2-
title: Configuring Transactional Replication on Multiple SQL Server Linux Containers Might Fail
2+
title: Troubleshoot Issues Configuring Transactional Replication on Multiple SQL Server Linux Containers
33
description: Learn about a known issue when configuring transactional replication in SQL Server on Linux containers, including symptoms, cause, workaround, and resolution.
4-
author: pijocoder
5-
ms.author: mlandzic
6-
ms.reviewer: randolphwest
4+
ms.reviewer: pijocoder, mlandzic, randolphwest, v-shaywood
5+
ms.custom: sap:Replication, Change Tracking, Change Data Capture\Errors or unexpected results during operation
76
ms.date: 11/03/2025
8-
ms.topic: troubleshooting
97
---
108

11-
# Configuring transactional replication on multiple SQL Server Linux containers might fail
9+
# Configuring transactional replication on multiple SQL Server Linux containers fails
1210

13-
This article guides you how to resolve an issue with two SQL Server running on Linux container on the same machine to be configured as replication subscribers.
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.
1412

1513
## Symptoms
1614

17-
When configuring **Transactional Replication** on SQL Server 2022 running in Linux containers, you might encounter the following error:
15+
When configuring **Transactional Replication** on SQL Server 2022 running in Linux containers, you might encounter the following error message:
1816

19-
```output
20-
The subscription already exists.
21-
```
17+
> The subscription already exists.
2218
23-
This issue typically occurs when:
19+
This issue usually occurs when:
2420

2521
- Two SQL Server instances are hosted in separate containers on the same Linux machine.
2622
- Both instances are added as subscribers to the same publisher.
2723
- The connection strings use the same hostname but different port numbers (for example, `LINUXHOST,5455` and `LINUXHOST,5465`).
2824

2925
## Cause
3026

31-
The issue occurs because subscriber metadata doesn't honor port numbers during persistence. Only the hostname is stored, causing the second subscriber to be perceived as a duplicate of the first.
32-
This behavior is specific to Linux container environments where named instances don't exist, and connections rely on hostname and port mapping.
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.
3329

3430
## Workaround
3531

36-
To successfully add multiple subscribers on the same host but different containers:
32+
To successfully add multiple subscribers on the same machine but in different containers:
3733

38-
1. Install **Cumulative Update 20 (CU20)** for SQL Server 2022.
34+
1. Install [Cumulative Update 20 (CU20) for SQL Server 2022](https://www.catalog.update.microsoft.com/Search.aspx?q=KB5059390).
3935

40-
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.
36+
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.
4137

42-
1. Perform the following manual cleanup and configuration steps in Transact-SQL. Make sure to replace `@hostname`, `@port_sub1`, `@port_sub2`, publication, publisher, and subscriber database variables with values specific to your environment:
38+
1. Perform the following manual cleanup and configuration steps in Transact-SQL. Make sure to replace the `@hostname`, `@port_sub1`, `@port_sub2`, `@PublicationName`, `@SubscriberDb_Sub1`, and `@SubscriberDb_Sub2` variables with values specific to your environment:
4339

4440
```sql
4541
DECLARE @hostname AS SYSNAME = 'LinuxSubscriberHostName',
@@ -170,9 +166,9 @@ To successfully add multiple subscribers on the same host but different containe
170166

171167
## Resolution
172168

173-
As of now, no permanent fix is available. The workaround is the recommended approach.
169+
Currently, no permanent fix is available. The previous [workaround](#workaround) is the recommended approach.
174170

175-
The product team is evaluating a fix for a future release. When resolved, this article is to be updated or retired accordingly.
171+
The product team is evaluating potential fixes for future releases. Once a permanent fix is available, this article will be updated.
176172

177173
## Related content
178174

0 commit comments

Comments
 (0)