Search code examples
sql-server-2005database-permissions

Grant permission to only a view


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


Solution

  • USE DB1;
    GRANT SELECT ON OBJECT:: View1 TO JohnDoe;
    GO
    

    Refer to GRANT Object Permissions for other examples of granting permission