All Forums Database
Sankalp.C 45 posts Joined 08/13
30 Mar 2015
How to find the Object IDs form DBC where it is stored.

How and where Objects are stored and where IDs corresponding to them are stored?

dnoeth 4628 posts Joined 11/04
02 Apr 2015

Can you explain in detail what you're trying to achieve?
Which objects? TablesViews/etc.?
DBC.tvm holds the TVMIds, but the DBC views don't show them.

Dieter

Sankalp.C 45 posts Joined 08/13
02 Apr 2015

DBC always keeps a track of the objects and id corresponding to it, as per my understanding. even elemts like ProcsRowLock, TempTableId,StatusQRYID etc are get tracked, my objective is to find till which id things have been tracked and how the next id is being assinged and how it is stored hierarchically, being said that i meant -
LockID connected to A row, row connected to a table, table connected to a data base and so on..

dnoeth 4628 posts Joined 11/04
06 Apr 2015

dbc.tvm shows the object's tvmid and databaseid, but the the row's ROWID is normally not shown (has been switched off since Vr25) and there's no LockId at all.
 
It's still the same question: Can you explain in detail what you're trying to achieve?

Dieter

Win 28 posts Joined 03/13
03 Aug 2016

Hi Sankalp,
 
The "next system-generated unique identification number available for use by the system" and that is assigned to object(s) last created can be found in DBC."NEXT" table. The relationships between objects in Data Dictionary can be found by executing the following sample queries:

-- To identify the relationships between DBC TABLES/VIEWS
SHOW VIEW DBC.DATABASESV;
SHOW VIEW DBC.TABLESV;
SHOW VIEW DBC.COLUMNSV;
 
-- To determine in which database objects a particular DBC."NEXT" column is being used
SEL * FROM DBC.COLUMNSV
WHERE COLUMNNAME = 'TABLEID' -- Replace literal with specific column name being searched
-- or
SEL * FROM DBC.TABLESV
WHERE REQUESTTEXT LIKE '%TABLEID%'; -- Replace search criteria with specific column name being searched

 
Best regards,
Win

You must sign in to leave a comment.