You can't do a simple join on sysobjects, because the objects referred to in
the sp_lock output can come from any database on the server.
The only solutions I have seen for this are ones that use row at a time
processing and dynamic SQL to access the right sysobjects, corresponding to
the database id that sp_lock refers to.
Sybase had a cool solution for this, when they enhanced their object_name( )
function to take a second parameter of a database ID. I am still waiting for
MS to do this.
SQL Server MVP
"alien2_51" <dan.billown.o.s.p.a.m.monacocoach.com> wrote in message