SELECT Object_name(ObjectID) = NULL | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SELECT Object_name(ObjectID) = NULL

Sometimes I use SP_Lock [SPID] to know which object the session is working with. Now when I collect the objectId and do SELECT Object_name(ObjectID) Then I find the result is null many times.
What this null signifies? Regards,
Ashish Johri
Probably a temporary table. Roji. P. Thomas
SQL Server MVP

Thanks Roji. But not sure right??
Ashish Johri
Make sure you run SELECT Object_name(ObjectID) in correct database otherwise you get null value if the object with that objectid does not exists… MohammedU.