Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    San Francisco, CA

    Unanswered: Adding a user to a Read-Only database

    Hey guys,

    I currently have a sql server 2000 sp4 instance with a read-only db on it. We get tlogs shipped from an outside vendor and keep a copy of the production database in house for reporting purposes. The database is in read-only mode because we apply new tlogs daily. Recently we did a full recover and applied 2 tlogs.

    The issue:
    There is a user YYY in the database and at the server level, but they aren't linked. So I do what I usually do and run the following command:

    exec sp_change_users_login  'Update_One', 'YYY','YYY'
    Except for I get the following error:

    Server: Msg 3906, Level 16, State 1, Procedure sp_change_users_login, Line 109
    Could not run BEGIN TRANSACTION in database 'ZZZ' because the database is read-only.
    Now this error makes sense and I understand why, so my question is how do I fix the users not being linked?

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 11
    Easiest would be to drop the login on your server, and re-create it with the SID of the user in the database. Alternatively, you can try to have the vendor drop the user and login on their end, and recreate it with your login's SID. The new SID will be brought to your server with the appropriate TLog restore.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts