Find blocking sessions and tables

Database
Junior Supporter

Find blocking sessions and tables

Hi,

In our environment, we have an application that runs queries and they block each other for some tables. I want to know which all sessions and which all tables are in blocked state with that ID? i went to table  dbc.monitorsession_hst_TZ and pulled the data. I can see that there are columns like - blk3objdbid and blk3objtid that i think contains the databaseid and tableid of the blocked tables. My questions are below :

1.how to map these IDs to the tablename and databasename ?

2. Is this the right table where i am looking into ? is there another/better way to find this ?

--samir singh

Tags (1)

Accepted Solutions
Junior Supporter

Re: Find blocking sessions and tables

You can use following functions to map the ids to names

IdentifyTable

IdentifyDatabase

dbid=1 is for DBC

tid=102 is for AccessRights table


Abhishek Jadhav
1 ACCEPTED SOLUTION
4 REPLIES
Junior Supporter

Re: Find blocking sessions and tables

I see the values as blk3objdbid = 1 and blk3objtid = 102, screenshot attached

Junior Supporter

Re: Find blocking sessions and tables

Could anyone please help me on this ?

--samir

Junior Supporter

Re: Find blocking sessions and tables

You can use following functions to map the ids to names

IdentifyTable

IdentifyDatabase

dbid=1 is for DBC

tid=102 is for AccessRights table


Abhishek Jadhav
Junior Supporter

Re: Find blocking sessions and tables

Thanks Abhishek, it works.