Web 同步复制:(0x80004005):架构脚本“xxx”;无法传播给订阅者

发布于 2024-10-05 10:00:22 字数 650 浏览 7 评论 0原文

我在设置复制(通过 HTTPS 进行网络同步)时遇到了很大的麻烦。

如果我只发布表格,它们可以很好地复制数据。

如果我添加视图和然后它会失败并显示消息:

ComErrorException (0x80004005): The schema script 'xxx' could not be propagated to the subscriber

发布是 SQL 2008,订阅者是 SQL Express 2005。

视图都相对简单,例如:(SQL 在顶部添加了 DROP)。

删除视图 [dbo].[vAllUsers] 将

QUOTED_IDENTIFIER 设置为 ON 去 设置 ANSI_NULLS 为开 去

创建视图 [dbo].[vAllUsers] AS 选择用户ID 来自员工 其中用户 ID 不为空 联合所有 选择用户ID 来自船舶工作人员 其中用户 ID 不为空 联合所有 选择用户ID 来自车队经理 其中用户 ID 不为空 我

很困惑,基本上不知道自己在做什么。有人有什么想法吗????

2010 年 12 月 3 日更新

好吧,我已经在这个问题上摆弄了一段时间了。它确实复制表、数据和用户定义的函数,但不会复制存储过程或视图。这说明什么?

Ive been having great trouble setting up replication (web sync via HTTPS).

If I only publish the tables, they replicate fine with the data.

If I add in views & sprocs then it failes with the message:

ComErrorException (0x80004005): The schema script 'xxx' could not be propagated to the subscriber

The publication is SQL 2008 and the subscriber is SQL Express 2005.

The views are all relativly simple, such as: (SQL added the DROP at the top).

drop View [dbo].[vAllUsers]
go

SET QUOTED_IDENTIFIER ON
go
SET ANSI_NULLS ON
go

CREATE VIEW [dbo].[vAllUsers] AS
SELECT userid
FROM staff
WHERE userid IS NOT NULL
UNION all
SELECT userid
FROM vesselstaff
WHERE userid IS NOT NULL
UNION all
SELECT userid
FROM fleetmanagers
WHERE userid IS NOT NULL
go

Im confused and basically dont know what Im doing. Does anyone have any ideas????

Update 3rd Dec 10

Ok, I've been fiddling with this for a bit longer. It does replicate the tables, data and user defined functions but no stored procedures or views will go. What does this indicate?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

[旋木] 2024-10-12 10:00:22

好的,我希望这可以帮助其他人,因为我发现了问题所在。

基本上,如果没有表,存储过程和视图将无法复制(我在这里找到了一个关于此的 MSDN 博客 链接文本)。因此,在我的示例中,我已经拥有所有表和数据,因此当我开始添加视图时,它们是唯一遇到的东西,但它不起作用。

我还有一个函数引用已被删除的列(因此当它在订阅者处创建时失败)。

我们还有大量数据需要复制(我们正在进行 HTTP Web 同步复制),因此必须调整服务器上代理中的设置,以便每次点击发送更少的数据。请参阅本文了解信息链接文本

OK I hope this helps someone else as I found out what the problem is.

Basically, sprocs and views will not replicate without a table (there was an MSDN blog I found about this here link text). So in my example, I already had all the tables and data, so when I started adding views they were the only things coming across and it doesn't work.

I also had a function that was referencing a column that had been deleted (so when it was CREATED at the subscriber it failed).

We also had a lot of data to replicate (we were doing HTTP web sync replication) so had to adjust the settings in the agent on the server so it sent less data per hit. See this article for info link text

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文