bschelst/ August 14, 2017/ SQL-Server/ 0 comments

You can create a temporary lock in T-SQL for -for example- testing:

 
BEGIN TRAN   
SELECT 1 FROM TABLE WITH (TABLOCKX) WAITFOR DELAY '00:02:00'  ROLLBACK TRAN 
GO 
Share this Post

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*

one × five =