Wednesday, March 21, 2012

How to get table info from RID deadlock ?

Hi There

I am trying to troubleshoot deadlock issues.

The dead lock is with a RID.

Now from various links i have established that you have to use DBCC PAGE() with relevant info to get more information, i get back a object and index id, m_objid.

However i dont know how to get the tablename form here, msdn simply says that it is an allocation id not and actual table id, so how can i from here get to table information?

All i am trying to figure out is which table is affected fromt he RID dealock, but that does not seem to be a simple process.

Thanx

Anyone please ?

I have had the deadlock again:

Info is as follows:

RID 7,1, 6937169, 1

So i do the following to get the m_objid.

Dbcc traceon(3604)

Go

Dbcc page(7,1, 6937169, 0)

Once i have the m_objid , i do the following select object_name(m_objid), this returns null ?

Someone please tell me how on earth do you get the table name from the deadlock info involving a RID ?

Thanx

|||In SQL 2005, you can get the object id from Metadata: ObjectId when you execute the DBCC PAGE command.

Thanks,|||

Hi Marcel

I have already stated that, what i am asking is how do you get from the allocation object id provided by DBCC PAGE to a actual table name, select object_name(m_objid) , using the object id returned by DBCC PAGE returns null ?

|||My Apologies Marcel, i see you meant MetaData object id, that works, thanx a million.

No comments:

Post a Comment