Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Oracle 7 unique TABLE_ID's

Status
Not open for further replies.

slubbock

Programmer
Sep 23, 1999
4
NZ
I have a small table in which we store a unique TABLE_ID. Don't ask why!! It was set up by Oracle for us. <br>Now, we have added some new tables and I need to populate this Table data into the unique TABLE_ID's. <br>Can anybody tell me where the unique table_id id stored in the database?<br>I have talked to the DBA that we use, and he is not certain either.<br><br>STU<br>MADRE Data Warehouse Admin.
 
Is this not a Sequence?&nbsp;&nbsp;If it's not, and you're getting all of your unique ID's from a <i>user</i> table, then that table should be visible to at least the developer, and if not, the dba should be able see it.&nbsp;&nbsp;If you only need unique ID's on a <i>per table</i> basis, a sequence is the way to go.&nbsp;&nbsp;If, for some reason, you need unique id's across <i>all</i> tables, then you've got to find that table, and if the dba can't, something isn't right.<br>--Jim
 
Yes, the question is a little unclear.&nbsp;&nbsp;You can always create a sequence for your table that will provide a unique id.<br><br>If you need the id from the Oracle catalog, I think you can get it from the view ALL_OBJECTS.&nbsp;&nbsp;You would populate your TABLE_ID column with ALL_OBJECTS.OBJECT_ID<br>&nbsp;where object_type='TABLE'<br>&nbsp;and owner='new_table_owner'<br>&nbsp;and object_name='new_table_name'.<br><br>Good luck.&nbsp;&nbsp;I hope this helps.
 
TABLE_ID? What's the table name? And are you *sure* you need this? It doesn't sound as if it's a standard Oracle table, is it required by one of your applications?<br><br>Regards<br> <p>Mike<br><a href=mailto:Mike_Lacey@Cargill.Com>Mike_Lacey@Cargill.Com</a><br><a href= Cargill's Corporate Web Site</a><br>Please don't send me email questions without posting them as well. Post the question and send me a note saying "Have a look at so-and-so would you?" - that's fine.
 
I would recommend checking your DBA_DEPENDENCIES view to see if anything actually depends on this table.&nbsp;&nbsp;If not, I wouldn't worry about it.<br>If it turns out you DO need it, I would get hold of the consultant who set it up and make him/her explain how the mechanism works.<br>This is NOT a standard Oracle table.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top