0

I've seen this error message in other posts. They didn't seem to help resolving our issue. We are trying this with two SQL Server 2008 servers. I backed up my database from the source server and then restored it on our destination server. We setup basic Transaction Replication. The Snapshot Agent is working fine. The Log Reader Agent fails with the error above. Is it most likely a login issue for this job or QueryTimeout?

Rick
  • 45
  • 3
  • 7
  • What does the logfile say? There should be more detail associated with this. – Kenneth Jun 11 '10 at 14:30
  • Error messages: The process could not execute 'sp_replcmds' on 'SVR-DENVER'. (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 'SVR-DENVER'. (Source: MSSQL_REPL, Error number: MSSQL_REPL22037) Get help: http://help/MSSQL_REPL22037 – Rick Jun 14 '10 at 15:14
  • Does the database have an owner? – Dee Yu Jun 16 '11 at 20:59

3 Answers3

1

Create the logins on both principal & Mirror with the same LOGIN NAME and SID

Step1: Create a login 'abc' on principal

Step2: Copy the SID of the login using the below code:-

"use master Select SID, name, dbname from syslogins"

Step3: Create a login 'abc' in the mirror using the code below:-

CREATE LOGIN Test WITH PASSWORD = 'xyz', SID = 'SID of principal abc login'

Step4: Change the db owner of both mirror & principal databases using sp_changedbowner 'abc'

Step5: Your problem is solved :)

0

Rick, I don't have an answer as I have the same setup as you and getting the same error. However when I set up a new test database under SQL 2008 the replication works fine but the database I am trying to replicate started off life in SQL 2000 so I guess the issue is something to do with that??

0

Sounds like the account that the log reader is running under doesn't have rights in one or more of the databases.

mrdenny
  • 27,174
  • 4
  • 41
  • 69