urgent - SQL 2008 - Table lock

choudang

Padawan
hi,

need some info on SQL 2008. one of my x-colig asked me on this scenario, i said with Tablock but i am not too confident on that, AFAIK, we have to apply trigger to prevent table drop.

case: Org has two databases as DB1 and DB2, for accessing every user has to authenticate themselves. as 2008 sql has GUI, DB2 users can delete any table from the tree, db rights are same for DB2 users. my frnd want to apply a lock to a certain table, so that table can't be dropped by other user.

Select * from Table_Name with TABLOCKX

this is not working, suggestions pl.
 
Top Bottom