BLOCK INSERTS, UPDATES FOR A TABLE

  • IS IT POSIBLE RO RESTRICT A TABLE TO PERMIT ONLY READS, NO UPDATES, INSERTS? AND HOW CAN I DO THAT?

    THANKS FOR ANY HELP.

     

  • Look at the GRANT and DENY transact SQL statements in Books Online.

    If you also want to restrict it somewhat from administrators, you can do several things...

    a) Create a trigger for INSERT and for UPDATE - have it do a rollback.

    b) You can (search on this site to find out how) mark the tables as system tables.

    Both of these can be overridden by a savvy admin.  I would recommend that you use the GRANT/DENY statements on a login that your app uses, or on a group that all of your users belong to.

Viewing 2 posts - 1 through 1 (of 1 total)

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