Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DeadLocks and Locking

Status
Not open for further replies.

nikhilparchure

Programmer
Oct 6, 2001
121
AU
We have been facing this production issue of locking which is hampering the performance of the system.

What is required is a query that will query the system tables
and would be able to give the locked tables and which process has been locking the same and by which users

Well I have a vague idea of the table involved but it would be helful if i get a refined query for process locking and processes, users locking the databases...

some tables ...
syslocks
sysprocesses
sysdatabases
sysobjects


I have been able to get a very raw query which need to be further refined
Help need guys

Select A.id 'Table ID' ,
B.Name 'TableName' ,
C.hostname 'HostName' ,
C.Program_name 'Program'
from master..syslocks A ,
sysobjects B ,
master..sysprocesses C
Where A.id = B.id
and A.spid = C.spid
and B.type = 'U'

I want the above query to be refined

Regards
Nikhil Parchure
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top