Share via


Replication Log Reader Agent Error "The principal dbo does not exist" 複寫記錄讀取器代理程式出現主體dbo不存在

Replication Log Reader Agent Error "The principal dbo does not exist"


設定SQL Server Replication複寫時,Log Reader Agent複寫記錄讀取器代理程式出現以下錯誤

Error: 錯誤訊息

Error messages:

  • The process could not execute 'sp_replcmds' on 'SQLPublisher'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)
    Get help: https://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: https://help/15517
  • The process could not execute 'sp_replcmds' on 'SQLPublisher'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)
    Get help: https://help/MSSQL_REPL22037

Cause: 原因

Publication database's owner does not exist

發行資料庫沒有設定擁有者

PS.通常發生在,當發行資料庫是從備份檔還原,而資料庫的建立者無法在還原的資料庫找到對應時,還原後就會是空白

Resolution: 解決方法

發行資料庫設定擁有者

1.right click on the database that you want to change the owner and go to “Properties” menu.
2.In the properties window, go to menu “Select a page -> Files”. Search or type the new owner.

Replication Log Reader Agent back to normal 恢復正常