All Forums Database
teradatauser2 236 posts Joined 04/12
06 Sep 2016
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

teradatauser2 236 posts Joined 04/12
06 Sep 2016

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

teradatauser2 236 posts Joined 04/12
07 Sep 2016

Could anyone please help me on this ?
--samir

abhishek.jadhav 28 posts Joined 02/08
07 Sep 2016

You can use following functions to map the ids to names

IdentifyTable

IdentifyDatabase

 

dbid=1 is for DBC

tid=102 is for AccessRights table

Thanks
Abhishek Jadhav

teradatauser2 236 posts Joined 04/12
07 Sep 2016

Thanks Abhishek, it works.

You must sign in to leave a comment.