x

User privileges as db_datareader, db_datawriter

All,

Can a user with the db_datareader and db_datawriter access drop or or alter a contraint??

more ▼

asked Apr 04, 2011 at 12:55 PM in Default

avatar image

Katie 1
1.4k 132 164 205

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

Take a look at the fixed db roles in books online:

http://msdn.microsoft.com/en-us/library/ms189612(v=SQL.100).aspx

The roles grant select, insert and delete along with view database, nothing to do with DDL though.

You will need to take a look at maybe granting access on an object level, or maybe the DDL Admin fixed role, although that allows alot more than just constraints.

more ▼

answered Apr 04, 2011 at 12:58 PM

avatar image

WilliamD
26.2k 18 34 48

(comments are locked)
10|1200 characters needed characters left

No. If a user has such ability and you're thinking they only have db_datareader and db_datawriter, check to see if they are coming into the database with a Windows group. Also check to see if they have explicit permissions granted that permit them to create tables or alter the schema containing the tables. Use the sp_helprotect stored procedure in SQL Server 2000 or query the sys.database_permissions catalog view in SQL Server 2005/2008/2008R2.

more ▼

answered Apr 04, 2011 at 06:17 PM

avatar image

K. Brian Kelley
1k 1 4 4

(comments are locked)
10|1200 characters needed characters left

Like there are db_denydatareader and db_denydatawriter fixed roles which given to an individual user would override roles inherited from Windows Groups, I'd like to see a db_denyddladmin fixed role, to solve the scenario: "Allow everyone in the Windows group Statistic Creators except user A and user B to create new views, alter table A, table B and table C"

more ▼

answered Apr 05, 2011 at 04:53 AM

avatar image

Magnus Ahlkvist
21.1k 19 39 42

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x2076
x993
x198

asked: Apr 04, 2011 at 12:55 PM

Seen: 7301 times

Last Updated: Apr 04, 2011 at 10:29 PM

Copyright 2016 Redgate Software. Privacy Policy