Restrict access to individual table

  • Hi there,

    Is there a way to restrict access to individual table in sql server 2005.?

    Please let me know.

    Thanks,

    Ananda

  • Yes. You can restrict aceess to individual tables with GRANT/DENY command.

  • Can you please give send me a piece of code which does that ?

  • Granting SELECT permission on a table

    The following example grants SELECT permission to user RosaQdM on table Person.Address in the AdventureWorks database.

    USE AdventureWorks;

    GRANT SELECT ON OBJECT::Person.Address TO RosaQdM;

    GO

    Denying SELECT permission on a table

    The following example denies SELECT permission to the user RosaQdM on the table Person.Address in the AdventureWorks database.

    USE AdventureWorks;

    DENY SELECT ON OBJECT::Person.Address TO RosaQdM;

    GO

    Please refere BOL for more info and examples.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply