Home Forums SQL Server 2005 Administering How to give permission to a user in a read only database ? RE: How to give permission to a user in a read only database ?

  • Create the login on primary db first. And then, give it the permissions you want. After that, get the SID of the login by using this code:

    select sid from sys.syslogins

    where name = 'login_name'

    And finally, create the login on read-only db with the same SID of the login.

    sp_addlogin 'login_name', @passwd='mellon',

    @sid = the_sid, @defdb='MASTER'