• 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!