Cannot add rights for Builtin/administrators (SQL 2000)

  • Hi all,

    Problem: When tried to change permission for 'Builtin/Administrators'; "Error 15405: Cannot use the reserved user or role name 'dbo'" is displayed. I want to add permissions for a database role.

    It is an SQL Server 2000 system.

    Can anyone suggest to resolve this error?

    thank you.

    regards,

    develey

  • the built in administrators group has rights to everything, so logically you shouldn't add or subtract rights to a built in group.

    you usually do this two ways, add a role, give it rights, and then add users to the role. in this example, the role members have access to just 2 tables, and can only update one of them.

    Exec sp_addrole 'MyRole'

    GRANT SELECT ON MyTable TO MyRole

    GRANT SELECT ON MyTable2 TO MyRole

    GRANT INSERT, UPDATE, DELETE ON MyTable2 TO MyRole

    EXEC sp_grantdbaccess 'Corporate\JeffL', 'Jeff'

    EXEC sp_addrolemember 'MyRole', 'Jeff'

    add a user, give it rights.

    here's an example of a readonly user i might create:

    if user_id (''MyUser'') is null exec sp_grantdbaccess ''MyUser''

    exec sp_addrolemember ''db_datareader'', ''MyUser''

    exec sp_addrolemember ''db_denydatawriter'', ''MyUser'''

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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