How to find the Object IDs form DBC where it is stored.

Database
Enthusiast

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?

4 REPLIES
Junior Contributor

Re: How to find the Object IDs form DBC where it is stored.

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.

Enthusiast

Re: How to find the Object IDs form DBC where it is stored.

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..

Junior Contributor

Re: How to find the Object IDs form DBC where it is stored.

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?

Win
Teradata Employee

Re: How to find the Object IDs form DBC where it is stored.

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