DIGIT-ARC read-only archive · snapshot: July 23, 2026

urgent - SQL 2008 - Table lock

1 post · originally from https://geek.digit.in/community/threads/urgent-sql-2008-table-lock.141000/

choudang
choudang Original post #1
May 19, 2011 at 5:38 PM
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.