Msmerge_*_VIEW 视图中调用的 ISPALUSER 函数有何作用?
我试图了解 SQL Server 2005 复制的工作原理,并且正在查看标题为 Msmerge_[Publication]_[Table]_VIEW
的视图。 这些视图似乎定义了合并过滤器,并且非常简单,除了 WHERE
子句中的一行 sql:
AND ({fn ISPALUSER('1A381615-B57D-4915-BA4B-E16BF7A9AC58')} = 1)
ISPALUSER 函数做什么? 我似乎在管理工作室的功能下找不到它,网上也没有任何提及它。
(我查看这些视图的原因是,当客户端复制新记录时,我们会遇到性能问题。类似 的 Sql 如果不存在(从 [MSmerge_[Publication]_[Table]_VIEW] 中选择 1,其中 [ rowguid] = @rowguid)
正在运行,每行花费 10 秒以上,当您有超过几行上升时,这显然会降低性能)
I'm trying to understand how SQL Server 2005 replication works, and I'm looking at the views titled Msmerge_[Publication]_[Table]_VIEW
. These views seems to define the merge filters, and are pretty straight forward, except for one line of sql in the WHERE
clause:
AND ({fn ISPALUSER('1A381615-B57D-4915-BA4B-E16BF7A9AC58')} = 1)
What does the ISPALUSER function do? I cannot seem to find it anywhere under functions in management studio, nor really any mention of it on the web.
(The reason I'm looking at these views is that we have a performance issue when a client replicates up new records. Sql like if not exists (select 1 from [MSmerge_[Publication]_[Table]_VIEW] where [rowguid] = @rowguid)
is running and taking 10+ seconds per row, which obiously kills performance when you have more than a couple of rows going up)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
似乎它会检查用户是否处于特殊安全角色
MSmerge_PAL_role
,这似乎控制着谁有权访问复制功能。因此,
ISPALUSER
检查用户是否属于该特定角色。仍然不确定
PAL
代表什么。Seems its checking if the user is in the special security role
MSmerge_PAL_role
, which seems to govern who has access to the replication functionality.Therefore,
ISPALUSER
checks if the user is in that specific role.Still not sure what the
PAL
stands for.