A community member has associated this post with a similar question:
How to restrict underlying table access used for a view ?

Only moderators can edit this content.

How to restrict display of underlying tables of a View

Mira Pimbi 21 Reputation points
2022-03-26T11:34:19.557+00:00

HI all,
I've got following setup on SQL Server 2016.
There are 2 tables created on "GEN" schema on a Database.
There is a view( Let's say "vwEmp") on "HR" schema on the same database, and the view is created using 2 tables in above mentioned "GEN" schema.

For "vwEmp", I provided the view permission set to a specific windows 'HR group'. ( Right click "vwEmp" > Properties > Permissions > then added the 'HR group' > tick 'select' box )

But the issue is when users in the above 'HR group' try to open the view they get a message as they cannot open the view as they don't have access to "GEN" schema.

Is there a way to handle the above scenario pls? , What I want let 'HR group' open the view, and restrict access to tables on "GEN" schema ?

Thanks in advance.
Regards,
Mira

SQL Server | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.

    1 deleted comment

    Comments have been turned off. Learn more