SQL Server 2008 复制失败并显示:进程无法执行“sp_replcmds”;
我遇到了 SQL 复制问题,无法修复。我正在做的是从生产备份恢复两个数据库,然后在它们之间安装复制。复制的配置似乎没有任何错误,但是当我查看状态时,我看到如下错误消息:
错误消息:
进程无法执行 “MYSERVER1”上的“sp_replcmds”。得到 帮助:http://help/MSSQL_REPL20011
无法作为数据库执行 校长因为校长“dbo” 不存在,这种类型的主体 无法被冒充,或者您不 有许可。 (来源:MSSQLServer, 错误号:15517) 获取帮助: http://help/15517
该进程无法在“MYSERVER1”上执行“sp_replcmds”。 获取帮助:http://help/MSSQL_REPL22037
这是什么意思?
I have an issue with SQL replication that I am having trouble fixing. What I am doing is restoring two DBs from a production backup, and then installing replication between them. The replication seems to be configured without any errors, but when I look at the status I see error messages like this:
Error messages:
The process could not execute
'sp_replcmds' on 'MYSERVER1'. Get
help: http://help/MSSQL_REPL20011Cannot execute as the database
principal because the principal "dbo"
does not exist, this type of principal
cannot be impersonated, or you do not
have permission. (Source: MSSQLServer,
Error number: 15517) Get help:
http://help/15517The process could not execute 'sp_replcmds' on 'MYSERVER1'.
Get help: http://help/MSSQL_REPL22037
What does this mean?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
“dbo”映射到无效的登录名。如果您运行
select suser_sname(owner_sid) from sys.databases
,您可能会得到这两个数据库的 NULL。您需要将“dbo”更改为有效的登录名。在两个数据库上运行:'dbo' maps to a login that is invalid. If you run
select suser_sname(owner_sid) from sys.databases
, you probaly get NULL for those two DBs. You need to change 'dbo' to a valid login. Run, on both databases:更正错误的最简单方法是在 dbo 具有 NULL 登录匹配的数据库上使用 ALTER AUTHORIZATION。
The easiest way to correct the error is to use ALTER AUTHORIZATION on the databases which have the NULL login match for dbo.
我发现如果您使用文章过滤器,则必须使用唯一的过滤器名称。一旦我将过滤器名称更改为在所有文章中都是唯一的,它就解决了这个问题。
I found that if you use article filters, you must use a unique filter name. Once I changed the filter name to be unique across all articles, it fixed this issue.
在我们的例子中,运行 SQL 实例的服务帐户被锁定。一旦解锁并且我们停止/重新启动 LogReader SQL 代理作业,事情就会再次开始流动。
In our case the service account that the SQL instance was running on got locked. Once unlocked and we stopped/restarted the LogReader SQL agent jobs then things started flowing again.
当我遇到这个问题时,我的数据库没有正确设置所有者。我从另一个 Windows 域恢复了数据库,右键单击数据库 ->属性并在“常规”选项卡中验证所有者设置是否正确。但是,在“文件”选项卡中,根本没有设置所有者。一旦我设置了它,复制就可以毫无问题地运行。
When I had this problem, my database didn't have an owner set properly. I had restored a database from another windows domain, right clicked the database -> properties and verified in the "general" tab that the owner was set correctly. However, in the "files" tab, owner was not set at all. As soon as I set it, replication was running without problems.