locked
sp_changedbowner after Mirroring? RRS feed

  • Question

  • We're using Mirroring in our production environment, and we're pretty happy with it.

    After failing over, we find that permissions are not correct; especially if the mirror has become the primary and the primary has become the mirror. In particular, we find that we'll need to use sp_changedbowner to reset the ownership of the database.

    Why is this? We'd like fail over to just work, and bring the database back up without user intervention.
    Wednesday, March 7, 2007 11:54 PM

Answers

All replies

  • Hi Mike...sounds like you might have a situation where the logins on either server are not syncronized (particularly in this case, the login that is assiged as the owner of the database).  Take a look at the following link and see if you think it applies to your situation:

    http://blogs.msdn.com/chadboyd/archive/2007/01/05/login-failures-connecting-to-new-principal-after-failover-using-database-mirroring.aspx

    If you don't think that applies, could you perhaps provide some additional information in terms of what errors you are getting, where you see trouble, etc.?

    HTH

    Thursday, March 8, 2007 4:08 PM
  • Thanks for your helpful response, Chad!

    From poking around in the sysusers and syslogins tables, we figured that something was wrong with the SIDs on the account. I think your link will help us. We've applied the change and will keep an eye on it during the next failover.

    .B ekiM

    Monday, March 12, 2007 3:24 PM