December 6, 2007 at 2:31 am
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
December 6, 2007 at 5:03 am
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
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply