Read-only database and orphaned users.

  • I have a read-only database used in log shipping and I have orphaned users that need to be fixed. Of course I get the message below but is there a way to fix orphaned users

    in a read-only db and what does the last part of the error message mean?

    Thanks.

    Server: Msg 3906, Level 16, State 1, Procedure sp_change_users_login, Line 196

    Could not run BEGIN TRANSACTION in database 'db_name' because the database is read-only.

    The row for user 'xxxxxxxxx' will be fixed by updating its login link to a login already in existence.

    xxxxxx = user account.

  • You need to remove read only status, fix the users, then set it again.

    sp_change_users_login

  • Thanks. Management in the pursuit of faster and better web performance wants all reporting done against the log shipped database. This creates issues when it comes time to do a log restore and you need exclusive access to the database. I am thinking of switching from log shipping to incremental restores then I can update the copy of production without any problems.

Viewing 3 posts - 1 through 2 (of 2 total)

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