0

I have 1 SQL server 2017 in London (VPS) and I connect with remote on port 1413 with 'sa' user , that work perfect. I config Distributor and Publisher successfully as shown as on server B : Publisher and Distributor successfully

And create subscriber on server A (my Laptop) as shown as bellow: create subscriber

And subscriber created and started successfully but after 30 seconds show error 'The process could not connect to Distributor' as shown as : enter image description here

Additional information:' (from User sa) refused because the job is already running from a request by User sa. Changed database context to 'PUB4'. (.Net SqlClient Data Provider)'

henrry
  • 486
  • 6
  • 25
  • Replicating over a WAN, with a VPN connection, to a laptop? Replication is designed with high availability in mind, I doubt your laptop is going to be permanently switched on, nor always connected the the VPN, so why are you setting up replication here? – Thom A Sep 26 '20 at 12:59
  • server A is my laptop and always on, server B is VPS , I don't have VPN connection. – henrry Sep 26 '20 at 13:07
  • Side question, why are you so against updates? SQL Server 14.0.1000.169 is the **RTM** version of SQL Server 2017. We're on CU 22 now. You've been ignoring updates for around 2 years. – Thom A Sep 26 '20 at 13:07
  • *"I don't have VPN connection"* So you have an **unpatched** RTM server open to the world, and you're connected with an `sa` account?! I'd start looking at security before you start worrying about this. But a Laptop, connected to via the Internet, is *not* a good candidate as a replication destination or source. A laptop on it's own isn't a good candidate as a permentent host, it's not a "server", let alone for this set up. – Thom A Sep 26 '20 at 13:09
  • There have also been multiple security patches on SQL Server 2017 ([Build List](https://buildnumbers.wordpress.com/sqlserver/#SQLvNext)) so, in my opinion, you are *really* playing with fire here... The build you have is actually almost 3 years old (not the 2 I said)! – Thom A Sep 26 '20 at 13:32
  • Will my problem be solved if I install SQL Server 2019? my DB is for test and not very important data. – henrry Sep 26 '20 at 14:18
  • I'm not telling you to upgrade your version of SQL Server (from 2017 to 2019), I'm saying you need to update it (from RTM to CU22); 2 completely different things. But no, the problem won't be solved, because the plan you have is inherently flawed (in my opinion), but updating *will* solve all those security vulnerabilities in your instance. You never did answer my question by the way; what *do* you have against updates (especially security ones)? – Thom A Sep 26 '20 at 14:19
  • thanks for your Advice, I update to 2019 – henrry Sep 26 '20 at 15:40
  • Again... That **isn't** what I said... – Thom A Sep 26 '20 at 15:46
  • Right but maybe the OP is just setting replication up on their laptop for testing. I do it all the time. And sure, the OP does have the latest update, but that isn't why 'The process could not connect to Distributor'. – Brandon Williams Sep 26 '20 at 15:56
  • @henrry Enable verbose agent logging and/or drill down on the replication agent job history to see why you are unable to connect to the Distributor. – Brandon Williams Sep 26 '20 at 15:59

1 Answers1

0

This tutorial video solves my problem for best way login to distributor. And path snapshot folder must be path share folder with users, Like: \\DESKTOP-7Cxxx\myfolderForSnapshot else cant create snapshot file.

henrry
  • 486
  • 6
  • 25