Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Stop Modifing a Table

Author  Topic 

jooorj
Posting Yak Master

126 Posts

Posted - 2011-05-02 : 04:52:14
How to stop modification on used table
for example: I need to prevent current usage of Table for all users whose use it currently ?

lionofdezert
Aged Yak Warrior

885 Posts

Posted - 2011-05-02 : 05:38:53
If you need to stop any UPDATE or INSERT or DELETE functions from user then use AFTER UPDATE/INSERT/DELETE trigger
and if you want to make a table completely unavailable but still want to keep its definition and data, just DISABLE its clustered index.

--------------------------
http://connectsql.blogspot.com/
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2011-05-02 : 06:16:02
Deny insert update delete permissions. Then no one other than a sysadmin will be able to change data.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -