SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How grant db_owner permission to some objects


How grant db_owner permission to some objects

Author
Message
Judy Why
Judy Why
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1114 Visits: 828
Hi all,

How can I grant one user to have db_owner permission on some tables , but only have db_datareader permission on others tables.

Thanks
Adam Bean
Adam Bean
SSCertifiable
SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)

Group: General Forum Members
Points: 6704 Visits: 2222
Judy (1/25/2008)
Hi all,

How can I grant one user to have db_owner permission on some tables , but only have db_datareader permission on others tables.

Thanks


db_owner is a database role and basically means you have all database level options. You can not give it to specific objects with in a database. Sounds like you need a custom database role that gives permissions appropriately to different objects.

---
SQLSlayer
Making SQL do what we want it to do.
Judy Why
Judy Why
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1114 Visits: 828
Actually I created one custom database role, named "db_Custom" and added objects to this new role.

Users under this role only have "select, update, delete,insert" on objects.

But users need to own "alter table (view)" on those specific objects and create new table permission.


How can I implement this task?
SQL ORACLE
SQL ORACLE
SSCertifiable
SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)SSCertifiable (6.9K reputation)

Group: General Forum Members
Points: 6941 Visits: 1314
Add the role, ddladmin, to your custom_role.
Adam Bean
Adam Bean
SSCertifiable
SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)SSCertifiable (6.7K reputation)

Group: General Forum Members
Points: 6704 Visits: 2222
Judy (1/25/2008)
Actually I created one custom database role, named "db_Custom" and added objects to this new role.

Users under this role only have "select, update, delete,insert" on objects.

But users need to own "alter table (view)" on those specific objects and create new table permission.


How can I implement this task?



Check out "GRANT" in books online (http://msdn2.microsoft.com/en-us/library/ms188371.aspx)

GRANT CREATE TABLE TO db_Custom - etc.

---
SQLSlayer
Making SQL do what we want it to do.
Judy Why
Judy Why
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1114 Visits: 828
SQL ORACLE (1/25/2008)
Add the role, ddladmin, to your custom_role.


if I add ddladmin to custom_role, then users under this role will have ddladmin permission to all the tables, not only specific tables
Roy Ernest
Roy Ernest
SSCrazy Eights
SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)SSCrazy Eights (8.8K reputation)

Group: General Forum Members
Points: 8797 Visits: 6891
Cant you set up the objects that this User needs to alter in a seperate schema and gove Alter Schema permission for that schema?

-Roy
Judy Why
Judy Why
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1114 Visits: 828
I can issue "Grant Create Table to db_custom", no problem. but users only can create new table and no permission to alter tables.

When I exec "Grant Alter Table to db_custom", got the error message,

Msg 165, Level 16, State 2, Line 1
Privilege ALTER TABLE may not be granted or revoked.

By the way, the objects' owner is dbo.
Judy Why
Judy Why
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1114 Visits: 828
Roy Ernest (1/25/2008)
Cant you set up the objects that this User needs to alter in a seperate schema and gove Alter Schema permission for that schema?



I am using SQL Server 2000 SP4.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search