Re: Possible to determine in which table an object is stored?

From: TurkBear <john.greco_at_dot.state.mn.us>
Date: Tue, 13 May 2003 11:43:40 -0500
Message-ID: <kv72cvgmve7qkmmuppms6v8u8tncjtbqvs_at_4ax.com>


"Maximus" <qweqwe_at_qwqwewq.com> wrote:

>Is there a way to determine which schema and table a particular object
>belongs to?
>
>For example, I want to write a function that accepts an object ref and then
>does operations on it's storage table (or none at all if the object is not
>persistent).
>
>Regards
>
>

Multiple group posting is not usually a good idea..

Try using the

ALL_OBJECTS view to determine which OBJECTS may have a table storage component..

By linking this to other views ( ALL_TABLES, etc) you should be able to work with it in the way you want..

here is what is in the all_objects table: SQL> desc all_objects

 Name                                      Null?    Type
 ----------------------------------------- -------- -----------------------
 OWNER                                     NOT NULL VARCHAR2(30)
 OBJECT_NAME                               NOT NULL VARCHAR2(30)
 SUBOBJECT_NAME                                     VARCHAR2(30)
 OBJECT_ID                                 NOT NULL NUMBER
 DATA_OBJECT_ID                                     NUMBER
 OBJECT_TYPE                                        VARCHAR2(18)
 CREATED                                   NOT NULL DATE
 LAST_DDL_TIME                             NOT NULL DATE
 TIMESTAMP                                          VARCHAR2(19)
 STATUS                                             VARCHAR2(7)
 TEMPORARY                                          VARCHAR2(1)
 GENERATED                                          VARCHAR2(1)
 SECONDARY                                          VARCHAR2(1)
-----------------------------------------------------------------------------------------------
and the object types are:
( At least in my instance)
CONSUMER GROUP
FUNCTION
INDEX
LIBRARY
PACKAGE
PACKAGE BODY
PROCEDURE
SEQUENCE
SYNONYM
TABLE
TABLE PARTITION
TRIGGER
TYPE
UNDEFINED
VIEW

HTH, ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- Received on Tue May 13 2003 - 18:43:40 CEST

Original text of this message