yanci1179
asked on
sql server user restrict to one schema
I have a sql login that i want to restrict to one schema, how can i do that?
for example user1
and
marketing.customers
accounting.customers
I want user1 to only see marketing.customers. I have many more under the same schema. I want the user to me able to select from all the tables that exists for this schema. Is there a script for this?
for example user1
and
marketing.customers
accounting.customers
I want user1 to only see marketing.customers. I have many more under the same schema. I want the user to me able to select from all the tables that exists for this schema. Is there a script for this?
sorry last one should be:
grant select on schema::accounting to username
grant select on schema::accounting to username
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
grant view definition on schema::marketing to username
and to select data
grant select on schema::marketing to username
to resetrict to the other schema
deny select on schema::marketing to username