SELECT DISTINCT object_name(a.rsc_objid) AS object, a.req_spid, b.loginame
FROM master.dbo.syslockinfo a (nolock) JOIN master.dbo.sysprocesses b (nolock) on a.req_spid=b.spid
WHERE object_name(a.rsc_objid) IS not null
ORDER BY object
SELECT DISTINCT object_name(a.rsc_objid) AS object, a.req_spid, b.loginame
FROM master.dbo.syslockinfo a (nolock) JOIN master.dbo.sysprocesses b (nolock) on a.req_spid=b.spid
WHERE object_name(a.rsc_objid) IS not null
ORDER BY object