SQL Server 2008 复制失败并显示:进程无法执行“sp_replcmds”;

发布于 2024-08-30 07:07:06 字数 609 浏览 2 评论 0原文

我遇到了 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_REPL20011

Cannot 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/15517

The process could not execute 'sp_replcmds' on 'MYSERVER1'.
Get help: http://help/MSSQL_REPL22037

What does this mean?

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

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

发布评论

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

评论(5

漫雪独思 2024-09-06 07:07:07

“dbo”映射到无效的登录名。如果您运行 select suser_sname(owner_sid) from sys.databases,您可能会得到这两个数据库的 NULL。您需要将“dbo”更改为有效的登录名。在两个数据库上运行:

ALTER AUTHORIZATION ON DATABASE::[<dbname>] TO [sa]

'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:

ALTER AUTHORIZATION ON DATABASE::[<dbname>] TO [sa]
双手揣兜 2024-09-06 07:07:07

输入图片此处描述

更正错误的最简单方法是在 dbo 具有 NULL 登录匹配的数据库上使用 ALTER AUTHORIZATION。

enter image description here

The easiest way to correct the error is to use ALTER AUTHORIZATION on the databases which have the NULL login match for dbo.

ˉ厌 2024-09-06 07:07:07

我发现如果您使用文章过滤器,则必须使用唯一的过滤器名称。一旦我将过滤器名称更改为在所有文章中都是唯一的,它就解决了这个问题。

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.

穿透光 2024-09-06 07:07:07

在我们的例子中,运行 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.

七禾 2024-09-06 07:07:06

当我遇到这个问题时,我的数据库没有正确设置所有者。我从另一个 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.

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