Hello everyone.
I have one user in my database, and I want to grant to him permission to read only one view, nothing more, no tables, nothing.
How can I do this?
Thanks a lot.
P.S.: I am using MS SQL Server 2005
Hello everyone.
I have one user in my database, and I want to grant to him permission to read only one view, nothing more, no tables, nothing.
How can I do this?
Thanks a lot.
P.S.: I am using MS SQL Server 2005
Try this:
GRANT SELECT ON whatever_your_view_is_called TO bob_or_whatever_his_name_is
USE DB1;
GRANT SELECT ON OBJECT:: View1 TO JohnDoe;
GO
Refer to GRANT Object Permissions for other examples of granting permission
This is fairly simple to do with the Enterprise Manager UI or using the SQL code posted by a few others.
One thing I'd like to add is that you want to AVOID doling out rights to the Public role on any object that you might want to later lock down because there every new user you add will automatically be a member of this role.