Restricting View Permissions

56 Views Asked by At

I created a user with db_dataread permission and I want to make sure the user can only run views and not see the script to how the view was created. What is the best way of doing this. I want to make sure I have all the angles covered and make sure this user doesn't have access to the script. I am using MS SQL 2008.

Thanks in advance.

1

There are 1 best solutions below

0
On BEST ANSWER

@Djbril if you have given the user a db_dataread permission only then that should do the trick for not being able to click Design or use the Create To / Alter To options which obviously will show the underlying code that makes up the view.

Edit: I would also DENY his "View Definition" permission on the tables that the SQL View is using because he/she might be able to figure out where the data is coming from and creating his own view directly from the tables if the user has access to those.

Please mark as the answer if this helped :-)