January 4, 2010 at 2:23 pm
I am needed to create a user defined database role with select, update, delete,execute, alter, drop privilges on all objects on all the schemas in one database. What is the best way to achieve it. Using SQL Server 2005 EE.
hello
January 4, 2010 at 3:55 pm
I guess the first question would be why do you want to give a user role such high access rights?
Gethyn Elliswww.gethynellis.com
January 5, 2010 at 6:59 am
I'd create a role and give it those rights on each schema in the database. It's not quite db_owner so I'd avoid that.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
January 5, 2010 at 7:14 am
Jack Corbett (1/5/2010)
I'd create a role and give it those rights on each schema in the database. It's not quite db_owner so I'd avoid that.
Based on what Jack said, here's how i would create the role, and then add the users to that new role.
does this seem to be correct?
USE [SandBox]
GO
CREATE ROLE [NearlyAdmins]
ALTER AUTHORIZATION ON SCHEMA::[db_ddladmin] TO [NearlyAdmins]
ALTER AUTHORIZATION ON SCHEMA::[db_datareader] TO [NearlyAdmins]
ALTER AUTHORIZATION ON SCHEMA::[db_datawriter] TO [NearlyAdmins]
GRANT EXECUTE,ALTER TO [NearlyAdmins]
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply