Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: user_part_tables

RE: user_part_tables

From: Jankovic, Djordje <Djordje.Jankovic_at_allstream.com>
Date: Wed, 27 Apr 2005 15:33:31 -0400
Message-ID: <F8D067AE04F51D4A883A09042B9D1271144706D3@TOREX005.att-intra.com>


select * from dba_tab_columns where table_name=3D'USER_PART_TABLES' =20
will give you the column names, and you match this list with the list from the view definition.
=20
Thx.

Djordje

>=20

> > -----Original Message-----
> > From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-
> bounce_at_freelists.org]
> > On Behalf Of Bill Coulam
> > Sent: Wednesday, April 27, 2005 2:53 PM
> > To: oracle-l_at_freelists.org
> > Subject: user_part_tables
> >
> > This question probably applies to other data dictionary views as
well.
> >
> > If one describes user_part_tables, you get:
> > Name Type =3D20
> > ------------------------- ------------=3D20
> > TABLE_NAME VARCHAR2(30)=3D20
> > PARTITIONING_TYPE VARCHAR2(7) =3D20
> > SUBPARTITIONING_TYPE VARCHAR2(7) =3D20
> > PARTITION_COUNT NUMBER =3D20
> > DEF_SUBPARTITION_COUNT NUMBER =3D20
> > PARTITIONING_KEY_COUNT NUMBER =3D20
> > SUBPARTITIONING_KEY_COUNT NUMBER =3D20
> > ...
> >
> > I was interested in determining where the "DEF_SUBPARTITION_COUNT"
was
> > stored in the underlying system tables (partobj$ I believe). When I
> > opened the source for view USER_PART_TABLES, I got this:
> >
> > CREATE OR REPLACE VIEW sys.user_part_tables AS
> > SELECT o.NAME,
> > DECODE(po.parttype, 1, 'RANGE', 2, 'HASH', 3, 'SYSTEM', 4,
> 'LIST',
> > =3D09=3D09=3D09=3D09=3D09=3D09=3D09'UNKNOWN'),
> > DECODE(MOD(po.spare2, 256), 0, 'NONE', 2, 'HASH', 3,
'SYSTEM',
> > 4, 'LIST', 'UNKNOWN'),
> > po.partcnt, MOD(TRUNC(po.spare2/65536), 65536),
po.partkeycols,
> > ...
> > FROM sys.obj$ o, sys.partobj$ po, sys.ts$ ts, sys.TAB$ t
> > ...
> >
> > Ordinarily, if a view has a column named "PARTITIONING_TYPE", I
expect
> > to find, in the view's source, a column or alias that reads
> > "partitioning_type". Instead, I see unnamed derived columns, and
named
> > columns, that seem to be magically transformed to different names
that
> > show up in user_part_tables.
> >
> > Which brings me to my question: What makes the magical column name
> > transformation happen? What piece of this puzzle am I missing?
> >
> > --=3D20
> > bill coulam
> > bcoulam_at_gmail.com
> > --
> > http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Apr 27 2005 - 15:39:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US