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.
Author |
Topic |
rohitmathur11
Yak Posting Veteran
77 Posts |
Posted - 2009-12-07 : 02:37:04
|
Hi,how can i check that what all tables are locked in to database currently and by which user(session) ...is there any sql query for this.any idea..? |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-07 : 04:41:37
|
EXEC sp_lockMadhivananFailing to plan is Planning to fail |
 |
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-12-07 : 04:44:39
|
HiUse sys.dm_tran_locks -------------------------R... |
 |
|
rohitmathur11
Yak Posting Veteran
77 Posts |
Posted - 2009-12-08 : 01:42:49
|
ok..these views will show object id like which is locked ... so first i need to get object id then i can check lock ...? |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-08 : 03:52:56
|
Object_name(objectid) will give you object nameMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|