sufiyan.sarguroh (7/20/2012)
This does give access to only two tables , but does this prevent him from viewing the SPs and views ? Does it have to be done explicitly .
Also,
we can do the same via GUI , cant we ? By using the Securables option ?
You are correct, you can use the gui to do the same thing as the code examples.
If you dont grant access, a user cannot use procedures or views and also cannot see the text of the procsnor views either.
You get that ability from roles like ddl_admin, db_owner.
you can grant just the ability to see object definitions with GRANT VIEW DEFINITION whi ch is good for people making reports.
Lowell