Re: Finding the definition of a view

From: Hans Forbrich <forbrich_at_tibalt.supernet.ab.ca>
Date: 1996/02/02
Message-ID: <31124C70.6F76_at_tibalt.supernet.ab.ca>#1/1


Lee Levy wrote:
>
> In article <4ej7da$sm7_at_big.info.att.com>, Daniel Lieuwen <lieuwen> says:
> >
> >Assuming one has DBA priveleges, how does one find the definition of a
> >view? No one remembers the exact definition off hand, and we need it back.
> >
> >Also, where can one find a complete list of system table (e.g. TABS, COLS)?
> >Since they don't show up in TABS itself and I can't find even TABS and COLS
> >in the indexes of any of the stack of about 10 books that came with the
> >distribution, I'm out of ideas as to where to look.
> >
> >Thanks.
> >
> >Daniel
> >

Daniel,

Gosh ... I haven't heard of TABS & COLS relative to Oracle in a looooong time. Since Oracle 6, Oracle Corp. has been pushing the set of views:

       {context}_{content}

	where {context} is one of DBA, ALL or USER
        and content is like TABLE, TAB_COLUMNS, VIEWS, INDEXES, IND_COLUMNS ...

for example, DBA_TABLES == list of all table specs available to user with DBA priv, 
             USER_VIEWS == list of all views & text created/owned by user
             ALL_INDEXES == list of all indexes user for which user has access rights
				(owns or has been granted access (via table access))

The views can be identified by looking at USER_SYNONYMS (they are owned by SYS), and the details are available (as well as excellent examples of complex view creation) in the file CATALOG.SQL found (in UNIX) under $ORACLE_HOME/rdbms/admin/catalog.sql

I'd really push learning these system views ... they may not be as easy as our old TABS and COLS, but they are definitely worth it in the long run. Received on Fri Feb 02 1996 - 00:00:00 CET

Original text of this message