SQL Replication Setup - Almost There

只愿长相守 提交于 2019-12-04 10:38:32

Yeah, getting permissions issues worked out when setting up SQL Server replication can be a chore. Accessing a share on the domain controller from a machine outside the domain... hmm. Have you tried setting up the share on the subscriber machine? Not optimal as it puts the publisher at the mercy of network i/o when creating the snapshot... but...

You mention having set up the replication as a pull rather than push because it got you past login issues. Are/have you tried using SQL Server permissions rather than windows?

I guess I should also mention that if it weren't for the domain controller/non-domain machine combination in this situation I would have started by asking/confirming that the logins under which the SQL Server services were running on both machines were the same... as it is I'm not sure it would matter.

What are your setting's on the Subscriber Subscription Properties for Security --> Distributer and Publisher Connection?

Also, under the Publication Properties --> Publication Access List; Have you double checked that your Subscriber is in there?

Ok well as it turns out the Error Message was correct. But not in the way i thought.

I'm setting up replication over a VPN. The basic starting point of most firewalls I suspect is you can send out on most ports but not receive in.

I was able to get pull replication started but not push and the error occurred trying to read the snapshot. The thing that was confusing was that I could open the share from the subscriber machine so why couldn't SQL Server pull the snapshot?

In the end what was happening was that the ports for UNC/File Sharing 137,138,139 and 445 were not open 'into' the subscriber.

I was thinking the Subscriber would pull the snapshot off the distributor but I think it must request them but the Distributor was still pushing them to the subscriber and being blocked on the way in.

I confirmed my suspicions because I could open a share from Subscriber to Distributor but not from distributor to subscriber. Nor could I connect to the Subscriber server using SQLMgmtSutdio from the Distributor machine, all proof the firewall was stopping it in just that one direction.

So somehow even though the ports were blocked SQL was still able to set up the publisher, subscriber and distributor but not start the process until I got them opened.

Its running now.

Hope that long explanation helps someone else struggling with getting this going.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!