Link to home
Start Free TrialLog in
Avatar of rick
rick

asked on

SQL Server Role Security Error

Goal:  I want to give users "select" access to a schema via a role.  The schema will have views based on source tables, but I do not want the users to have access to the source tables.

Steps I've performed so far...
1.  Created the role and gave "select" access to the schema
2.  Added users to the role
3.  Created a view, within the schema, from a source table

Error:
When user tries to select from the view, they get an error because they do not have "select" access to the source.

How would I fix?
ASKER CERTIFIED SOLUTION
Avatar of Vitor Montalvão
Vitor Montalvão
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rick
rick

ASKER

Great articles.  Ready all 3.  Very applicable to what I'm doing.

But I am still slightly confused.  In particular, on the following two items

To avoid these situations we can create a View and give permissions only to that View instead of the Table.
You'll need to give SELECT permissions to the users on the required tables.

In my head (or lack of understanding), I'm seeing a contradiction.  I don't want to give users access to the underlying tables; rather, if possible, I only want access to the view.

If not too much trouble, could you try to bridge the gap for me?
Avatar of rick

ASKER

I think I got it now.  I had a few things set up incorrectly.  Thank you so much for your help.  And your articles were great.