1.分发服务器到订阅服务器的历史记录中看到的错误消息:

尝试的命令: if @@trancount > 0 rollback tran (事务序列号: 0x00014F30000020D9010700000000,命令 ID: 667)

错误消息: The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 5. (源: MSSQL_REPL,错误号: MSSQL_REPL21100) 获取帮助: http://help/MSSQL_REPL21100

错误日志中读到的消息:

Error: 14151, Severity: 18, State: 1.

Replication-Replication Distribution Subsystem: agent  "%s" failed. The distribution agent failed to create temporary files in 'C:\Program Files\Microsoft SQL Server\100\COM' directory. System returned errorcode 5.

-----------------

解决方案:

授予对运行 SQL Server 代理服务帐户的 C:\Program Files\Microsoft SQL Server\100\COM 文件夹的写权限。

参考http://support.microsoft.com/kb/956032

-------------------------------------------------------------------------------------------------------------------

2.分发服务器到订阅服务器的历史记录中看到的错误消息:

错误消息:
The process could not execute 'sp_replcmds' on ‘Server Name’. (源: MSSQL_REPL,错误号: MSSQL_REPL20011)
获取帮助: http://help/MSSQL_REPL20011
Could not obtain information about Windows NT group/user  "%s", error code 0x534. (源: MSSQLServer,错误号: 15404)
获取帮助: http://help/15404
The process could not execute 'sp_replcmds' on ‘Server Name’. (源: MSSQL_REPL,错误号: MSSQL_REPL22037)
获取帮助: http://help/MSSQL_REPL22037

-----------------

解决方案:

执行脚本:

--将mydb的owner改为sa或本地域下拥有sysadmin角色的账号mySysadmin
USE [mydb] GO EXEC dbo.sp_changedbowner @loginame = N'mySysadmin', @map = false GO

或者直接通过UI修改,如下图:

事物复制遇到的几个错误

可能原因:服务器曾经改过名字(从A改成了B),而Login[A\Administrator]没有相应的变为[B\Administrator],而我的mydb的owner恰好是

[A\Administrator],导致安全凭据出了问题。

 

相关文章:

  • 2022-01-29
  • 2021-11-02
  • 2021-11-27
  • 2021-10-24
  • 2021-10-18
  • 2022-12-23
猜你喜欢
  • 2021-10-03
  • 2021-07-26
  • 2021-11-16
  • 2022-12-23
  • 2022-01-12
  • 2021-11-01
  • 2021-12-31
相关资源
相似解决方案