Home Forums SQL Server 2005 SQL Server Express How do I allow all logged in users to access a SQL Express 2008 R2 database? RE: How do I allow all logged in users to access a SQL Express 2008 R2 database?

  • OK, without a doubt I have determined that the lines causing me problems are:

    EXEC sp_addrolemember N'db_datareader', N'[DomainUsersAccess]'

    EXEC sp_addrolemember N'db_datawriter', N'[DomainUsersAccess]'

    Those 2 lines generate the error messages:

    Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 75

    User or role '[DomainUsersAccess]' does not exist in this database.

    Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 75

    User or role '[DomainUsersAccess]' does not exist in this database.

    I just tried running those 2 lines of code again, and it failed with the same message. I don't understand why, because I'm running them connected to the database (ASI, in this case) where the DomainUsersAccess role exists. And I think I now know where that "Line 75" in the error message is coming from. I believe it's from the sp_AddRoleMember stored procedure; it's not from my 2 lines of SQL script.

    Kindest Regards, Rod Connect with me on LinkedIn.