Asked by:
SQL Server Replication using RMO

Question
-
We are using SQL Server replication using RMO. We have SQL 2016 (Standard Edition) on the server acting as the publisher and SQL Server Express Edition as the subscriber.
Previously, the distributor and the publisher were on the same server and the replication was working.
We have a client application, the data needs to be synced with the server on a regular basis.
We have Transactional and merger replication set and rely on pull approach where the client application pulls the data on demand.
For security reasons, the client doesn't want to expose port 1433 (or any other port) on the publisher to the subscribers.
So, we decided to move the distributor on a remote server, so that the subscriber talks to the publisher via remote distributor. (The remote distributor can connect and talk to the Publisher.) However, I am getting an error when I try to sync.
Wanted to check if replication is possible when port 1433 is blocked for the subscribers?
If yes, can you please provide me some sample code or pointers to it. If no, what are the different options that I can have?Saturday, August 1, 2020 2:03 PM
All replies
-
Hi Amit Nerurkar,
>> Wanted to check if replication is possible when port 1433 is blocked for the subscribers?
Assuming a push subscription and a default instance of SQL on the Subscriber, only inbound TCP port 1433 access at the subscriber is needed. In the case of a pull subscription, the Subscriber will pull from the distributor, so only inbound TCP port 1433 access at the distributor is needed.
Please refer to the following articles which might help:
SQL Server 2008 R2 Transactional replication ports
What are ports required for Merge Replication
Ports Used By the Database Engine
Best Regards,
Amelia
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Monday, August 3, 2020 7:59 AM -
Thank you Amelia for a quick reply. We tried to sync manually using SSMS. For this, we used SQL Server Developer edition instead of SQL Express. The transactional replication needs to connect to the publisher for initializing the publications after that they can sync with port 1433 blocked. For merge replication, it needs to have access to the publisher during initialization stage as well as during the sync. I appreciate your time and efforts for replying to this.
- Proposed as answer by Amelia GuMicrosoft contingent staff Friday, August 7, 2020 9:18 AM
Monday, August 3, 2020 7:57 PM -
Hi Amit Nerurkar,
I am glad to know that your issue has been solved. In order to close this thread, please mark useful replies as answers. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.
Best Regards,
Amelia
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.Tuesday, August 4, 2020 6:04 AM