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
# Configure replication with non-default ports (SQL Server Linux)
17
+
# Configure replication with nondefault ports (SQL Server Linux)
17
18
18
19
[!INCLUDE [SQL Server - Linux](../includes/applies-to-version/sql-linux.md)]
19
20
20
21
You can configure replication with SQL Server on Linux instances listening on any port configured with the `network.tcpport` mssql-conf setting. The port needs to be appended to the server name during configuration if the following conditions are true:
21
22
22
23
- Replication set-up involves an instance of SQL Server on Linux
23
-
- Any instance (Windows or Linux) is listening on a non-default port.
24
+
- Any instance (Windows or Linux) is listening on a nondefault port.
24
25
25
26
The server name of an instance can be found by running `@@SERVERNAME` on the instance. Don't use the IP address instead of the server name. Using the IP address for the publisher, distributor, or subscriber might result in an error.
26
27
27
28
> [!NOTE]
28
-
> Creating SQL Server replication on Linux with non-default port will only work with SQL Server 2019 and above.
29
+
> Creating SQL Server replication on Linux with nondefault port will only work with SQL Server 2019 and above.
### Linked server port not updated when recreating subscription
60
+
61
+
When you delete and recreate a subscription with a nondefault port on the Subscriber, the system reuses the existing linked server but fails to update the port configuration. This can cause replication to fail when attempting to connect to the Subscriber.
62
+
63
+
For more information about this known issue, including symptoms, cause, and workaround, see [Delete a push subscription](../relational-databases/replication/delete-a-push-subscription.md#known-issue-port).
64
+
56
65
## Related content
57
66
58
67
-[SQL Server replication on Linux](sql-server-linux-replication.md)
Copy file name to clipboardExpand all lines: docs/relational-databases/replication/create-a-push-subscription.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@ title: "Create a push subscription"
3
3
description: Learn how to create a push subscription in SQL Server by using SQL Server Management Studio, Transact-SQL, or Replication Management Objects.
This topic describes how to create a push subscription in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)], [!INCLUDE[tsql](../../includes/tsql-md.md)], or Replication Management Objects (RMO). For information about creating a push subscription for a non- [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] Subscriber, see [Create a subscription for a non-SQL Server Subscriber](../../relational-databases/replication/create-a-subscription-for-a-non-sql-server-subscriber.md).
@@ -241,19 +242,18 @@ You can create push subscriptions programmatically by using replication stored p
241
242
### <aname="PShellExample"></a> Examples (RMO)
242
243
This example creates a new push subscription to a transactional publication. The Windows account credentials that you use to run the Distribution Agent job are passed at runtime.
This example creates a new push subscription to a merge publication. The Windows account credentials that you use to run the Merge Agent job are passed at runtime.
This topic describes how to delete a pull subscription in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)], [!INCLUDE[tsql](../../includes/tsql-md.md)], or Replication Management Objects (RMO).
## <aname="SSMSProcedure"></a> Using SQL Server Management Studio
34
-
Delete a pull subscription at the Publisher (from the **Local Publications** folder in [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]) or the Subscriber (from the **Local Subscriptions** folder). Deleting a subscription does not remove objects or data from the subscription; they must be removed manually.
35
+
Delete a pull subscription at the Publisher (from the **Local Publications** folder in [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]) or the Subscriber (from the **Local Subscriptions** folder). Deleting a subscription does not remove objects or data from the subscription; they must be removed manually.
36
+
37
+
> [!NOTE]
38
+
> For information about a known issue that affects push subscriptions when using non-default ports, see [Delete a push subscription](../../relational-databases/replication/delete-a-push-subscription.md#known-issue-port).
35
39
36
40
#### To delete a pull subscription at the Publisher
Copy file name to clipboardExpand all lines: docs/relational-databases/replication/delete-a-push-subscription.md
+47-7Lines changed: 47 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@ title: "Delete a Push Subscription"
3
3
description: Learn how to delete a push subscription in SQL Server by using SQL Server Management Studio, Transact-SQL, or Replication Management Objects.
4
4
author: "MashaMSFT"
5
5
ms.author: "mathoma"
6
-
ms.date: 09/25/2024
6
+
ms.date: 02/03/2026
7
+
ai-usage: ai-assisted
7
8
ms.service: sql
8
9
ms.subservice: replication
9
10
ms.topic: how-to
@@ -14,10 +15,10 @@ helpviewer_keywords:
14
15
- "push subscriptions [SQL Server replication], deleting"
This topic describes how to delete a push subscription in [!INCLUDE[ssnoversion](../../includes/ssnoversion-md.md)] by using [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)], [!INCLUDE[tsql](../../includes/tsql-md.md)], or Replication Management Objects (RMO).
[Linked server port not updated when recreating subscription](#known-issue-port)
32
37
33
38
## <aname="SSMSProcedure"></a> Using SQL Server Management Studio
34
39
Delete a push subscription at the Publisher (from the **Local Publications** folder in [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)]) or the Subscriber (from the **Local Subscriptions** folder). Deleting a subscription does not remove objects or data from the subscription; they must be removed manually.
3. Right-click the subscription you want to delete, and then click **Delete**.
55
60
56
61
4. In the confirmation dialog box, select whether to connect to the Publisher to delete subscription information. If you clear the **Connect to Publisher** check box, you should connect to the Publisher later to delete the information.
62
+
63
+
## <aname="known-issue-port"></a> Known issue: Linked server port not updated when recreating subscription
64
+
65
+
When you delete and recreate a subscription with a nondefault port on the Subscriber, the system reuses the existing linked server but fails to update the port configuration. This can cause replication to fail when attempting to connect to the Subscriber.
66
+
67
+
**Applies to:** SQL Server (all versions including Linux), Azure SQL Managed Instance, Azure SQL Database (as Subscriber)
68
+
69
+
### Symptoms
70
+
71
+
After following these steps, data changes on the Publisher fail to replicate to the Subscriber:
72
+
73
+
1. Create a subscription with a non-default port specified for the Subscriber (for example, `MySubscriber,1450`)
74
+
2. Delete the subscription using `sp_dropsubscription`
75
+
3. Recreate the subscription with a different port (for example, `MySubscriber,1455`)
76
+
4. Publisher attempts to connect using the original port (1450) instead of the new port (1455)
77
+
78
+
### Cause
79
+
80
+
When you delete a subscription using `sp_dropsubscription`, the linked server to the Subscriber isn't deleted. When you recreate the subscription with a different port, the system reuses the existing linked server but doesn't update the port configuration.
81
+
82
+
### Workaround
83
+
84
+
Manually delete the linked server to the Subscriber after deleting the subscription and before recreating it:
-- Now you can recreate the subscription with a different port
92
+
-- The system will create a new linked server with the correct port
93
+
```
94
+
95
+
> [!IMPORTANT]
96
+
> Ensure no other subscriptions or processes are using the linked server before deleting it.
57
97
58
98
## <aname="TsqlProcedure"></a> Using Transact-SQL
59
99
Push subscriptions can be deleted programmatically using replication stored procedures. The stored procedures used depend on the type of publication to which the subscription belongs.
For immediate update, if you selected **Replicate** on the **Updatable Subscriptions** page of this wizard, you must specify an account with the Subscriber under which connections to the Publisher are made.
18
20
19
21
Connections are used by the triggers that fire at the Subscriber, and propagate changes to the Publisher. This account is required even if you selected **Queue changes and commit when possible** on the **Updatable Subscriptions** page. The New Subscription Wizard by default configures queued updating with the ability to switch to immediate updating if required.
@@ -43,6 +45,9 @@ f1_keywords:
43
45
44
46
**Use a linked server or remote server that you have already defined.**
45
47
This option requires a linked server or remote server that you have already defined. For more information, see [Linked Servers (Database Engine)](../../relational-databases/linked-servers/linked-servers-database-engine.md) and [Remote Servers](../../database-engine/configure-windows/remote-servers.md). Ensure that the login used for the linked server or remote server has a strong password and has only the permissions described in this topic.
48
+
49
+
> [!NOTE]
50
+
> If you're using non-default ports for your Subscriber and need to recreate a subscription, manually delete the linked server after deleting the subscription. For more information about this known issue, see [Delete a push subscription](../../relational-databases/replication/delete-a-push-subscription.md#known-issue-port).
0 commit comments