The process could not execute 'sp_replcmds' on 'ServerName\PUBLISHER' generated by the Log Reader

  • I'm continuously getting the following errors:

    The process could not execute 'sp_replcmds' on 'ServerName\PUBLISHER' generated by the Log Reader (Source: MSSQL_REPL, Error number: 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)

    The process could not execute 'sp_replcmds' on 'ServerName\PUBLISHER'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)

    Get help: http://help/MSSQL_REPL22037

    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)

    It never worked. I just installed Replication (Transaction).

    Any ideas?

    Thanks.

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • From the error, it sounds like an issue with the publisher database's owner (missing, invalid, etc.).

    Check to see if the publisher database has a valid owner by running the following:

    SELECT name, SUSER_SNAME(owner_sid) AS LoginName

    FROM sys.databases

    ORDER BY name

    If it does not, you can assign one by running the following:

    ALTER AUTHORIZATION ON DATABASE::[publisher_db] TO [sa]

  • Use ALTER AUTHORIZATION on the databases which have the NULL login match for dbo.

    ALTER AUTHORIZATION ON DATABASE::Example TO sa;

  • JeremyE (12/29/2015)


    From the error, it sounds like an issue with the publisher database's owner (missing, invalid, etc.).

    Check to see if the publisher database has a valid owner by running the following:

    SELECT name, SUSER_SNAME(owner_sid) AS LoginName

    FROM sys.databases

    ORDER BY name

    If it does not, you can assign one by running the following:

    ALTER AUTHORIZATION ON DATABASE::[publisher_db] TO [sa]

    Error messages:

    The process could not access database 'AdventureWorks2014Subscriber' on server 'ASSET2629\SUBSCRIBER'. (Source: MSSQL_REPL, Error number: MSSQL_REPL20052)

    Get help: http://help/MSSQL_REPL20052

    Cannot open database "AdventureWorks2014Subscriber" requested by the login. The login failed. (Source: MSSQLServer, Error number: 4060)

    Get help: http://help/4060

    Login failed for user 'NT AUTHORITY\SYSTEM'. (Source: MSSQLServer, Error number: 18456)

    Get help: http://help/18456

    I had the owner set to my account.

    I executed your code and the error message changed.

    Thanks for the tip!

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • johnwalker10 (12/29/2015)


    Use ALTER AUTHORIZATION on the databases which have the NULL login match for dbo.

    ALTER AUTHORIZATION ON DATABASE::Example TO sa;

    Is this not the same as what was recommended in the following post?

    For better, quicker answers on T-SQL questions, click on the following...
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    For better answers on performance questions, click on the following...
    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

  • JeremyE wrote:

    if the publisher database has a valid owner

    What is a valid owner? Kindly let us know.

    Thank you!

     

    • This reply was modified 4 months, 2 weeks ago by  Meera.
    • This reply was modified 4 months, 2 weeks ago by  Meera.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply