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_REPL20011Could not obtain information about Windows NT group/user "%s", error code 0x534. (源: MSSQLServer,錯誤號: 15404)獲取幫助: http://help/15404The process could not execute 'sp_replcmds' on ‘Server Name’. (源: MSSQL_REPL,錯誤號: MSSQL_REPL22037)獲取幫助: http://help/MSSQL_REPL22037
-----------------
解決方案:
執行腳本:
--將mydb的owner改為sa或本地域下擁有sysadmin角色的賬號mySysadmin。USE [mydb]GOEXEC dbo.sp_changedbowner @loginame = N'mySysadmin', @map = falseGO
或者直接通過UI修改,如下圖:
可能原因:服務器曾經改過名字(從A改成了B),而Login[A/Administrator]沒有相應的變為[B/Administrator],而我的mydb的owner恰好是
[A/Administrator],導致安全憑據出了問題。
新聞熱點
疑難解答