Log Reader Agent failing to initialize

Hello Guys,

Yestarday i was setting up a transacional replication and after all the process that you should do to configure one the Log Agent Reader Monitor was showing these messages to me:

Error messages:
The process could not execute ‘sp_replcmds’ on ‘DB01’. (Source: MSSQL_REPL, Error number: MSSQL_REPL20011)
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 ‘DB01’. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037)
Get help: http://help/MSSQL_REPL22037

The solution for these messages is a quite simple. This happens because the schema “DBO” maps to a login that doesn’t exists. Running this query select suser_sname(owner_sid) from sys.databases you might get a NULL value, so the only option you have is change the owner for a valid login.

ALTER AUTHORIZATION ON DATABASE::DATABASE TO SOME_LOGIN

After that, the replication should run fine..

Regards,
Marcos Freccia

Advertisements

About Marcos Freccia

MVP em SQL Server (Data Plataform) , especialista em SQL Server, e atualmente trabalhando com Microsoft Azure!

Posted on September 6, 2011, in Administração, VirtualPass and tagged , , , . Bookmark the permalink. 2 Comments.

  1. essa query me retorna alguns logins…mas continua failed ao executar a stored procedures

    • Lucas,

      Voce tentou mapear a usuario valido dessa sua base de dados? Crie um login e faça o mapeamento para um usuario nessa base com permissoes de db_owner e tente realizar as operações.

      Att,
      Marcos Freccia

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: