Friday, December 24, 2021

Check lock in sql server


set transaction isolation Level Repeatable read
begin transaction
select * from  [Tran]

rollback transaction

sp_lock

select OBJECT_name(949578421)
select * from sys.objects where object_id=949578421

1. If we lock


set transaction isolation Level Repeatable read
begin transaction
select * from  [Tran]

2. Checking with

sp_lock








3. Checking with object id (ObjId)

select OBJECT_name(949578421)

4. Checking with sys.Objects

select * from sys.objects where object_id=949578421 

5. To roll back locked status
rollback transaction


No comments:

Post a Comment

Linq Expression syntax for where condtion in linq

(Expression<Func<T, bool>> filter)