删除 SQL Server 复制订阅
我的计算机上的复制出现问题,SSMS 中显示的许多订阅并不存在。我尝试使用 SSMS 中的 UI 删除它们,还使用一些 T-SQL...但没有成功。这些出版物甚至不再存在(它们位于同一台机器上)。
关于如何删除它们有什么想法吗?
更多信息: 这就是我遇到的情况,有 3 个订阅(SSMS 不会让我查看,因为“它们不存在”)。
I have a problem with the replication on my machine where I am stuck with a number of subscriptions showing in SSMS that do not exist. I have tried deleting them using the UI in SSMS and also using some T-SQL...but no luck. The publications don't even exist any more (they were on the same machine).
Any ideas on how I could remove them?
More info:
This is the situation I appear to be in where there are 3 subscriptions (that SSMS will not let me look at because 'they do not exist').
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
分发数据库中可能有一些孤立的元数据。如果您不再发布任何数据,您可能需要尝试禁用发布和分发< /a> 删除孤立的发布和订阅。
You might have some orphaned metadata in the distribution database. If you're no longer publishing any data you might want to try Disabling Publishing and Distribution to remove the orphaned publications and subscriptions.
我发现奇怪的是
sp_removedbreplication
不起作用......也许尝试sp_dropsubscription
,并包含ignore_distributor
参数:I find it odd that
sp_removedbreplication
didn't work... maybe trysp_dropsubscription
, and include theignore_distributor
parameter:我发现有时复制创建的系统视图对象可能会挂起。停止手动重建复制。我的解决方案是手动删除系统视图syncobj。我建议在删除上面的发布属性之前始终删除订阅和发布,因为我发现项目被遗留下来导致长期问题。
I've found sometimes that the system view objects created by the replication can be left hanging. Stopping replication from being manually rebuilt. My solution was to manual drop the system view syncobj. I recommend always dropping the subscriptions and the publication before dropping publication properties above since I've found items get left behind leaving for long term problems.