开发者

How can I restrict CREATE TABLE access for a user to a specific schema (sql server)?

I'd like to allow some users to create tables in a particular schema, but not be able to create tables in other schemas. How can I achieve this?

I s开发者_开发技巧ee the CREATE TABLE help says

Requires CREATE TABLE permission in the database and ALTER permission on the schema in which the table is being created.

Does that mean I can give ALTER permission to the schema and restrict ALTER permissions on all other schemas?


In a nutshell, yes.

GRANT CREATE TABLE TO SomeUser
GRANT ALTER ON SCHEMA::AllowedSchema TO SomeUser
DENY ALTER ON SCHEMA::RestrictedSchema TO SomeUser


You can set user to schema owner

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜