Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 08 Mar 2002 @ 10:24:24 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Is the Tableid unique
 
From:   John Hall

The TABLEID (or TVMID) is unique system-wide.

FWIW: The origin of the value is located in DBC.NEXT, column TABLEID. Each time a table, view, macro (et al) is created, the TABLEID from DBC.NEXT is used to assign the TVMID value in DBC.TVM (the TABLEID is effectively left shifted 16-bits into 6-bytes and the least significant 16-bits is then used for the subtable value). The value in DBC.NEXT is then incremented by 1 in preparation for the next time a TVMID value in needed.

So if all you have is the TVMID (or TABLEID) value, then you need to join with DBC.TVM to determine the nature of your object - that information is contained in Column TABLEKIND ('T' is for table). For the name of your object, use Column TVMNAME.

To know the database in which the object is located, then you need to join with DBC.DBASE and Column DATABASENAME will give you the database name. Column ROWTYPE will indicate whether the database is a user ('U') or a database ('D').



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016