Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

tables (part or no part) and their tablespaces in oracle 11g

knowledgespringDec 9 2012 — edited Dec 9 2012
I need to list all the tables and their table spaces for non part tables along with partition tables, partition name and its table space , I am using the following query to find it however query result is not something what i am looking for as i see null in table space columns.

tablespace column has null for even non partition table.
in query result there are cases that null in all the tablespace_name columns.. ..
tablespace columns have nulls for even part tables in ALL_TAB_PARTITIONS ,ALL_PART_TABLES tables for few part tables ..

Should we generat object stats to correct name filled in tablespace column.. or am i using wrong tables in my query..? how come null in all the tablespace columns or should i include any other dictionary table?

select AT.OWNER, AT.TABLE_NAME, AT.TABLESPACE_NAME,AT.PARTITIONED,APT.PARTITIONING_TYPE,ATP.PARTITION_NAME, ATP.TABLESPACE_NAME,APT.DEF_TABLESPACE_NAME
From ALL_tABLES AT,
ALL_TAB_PARTITIONS ATP ,
ALL_PART_TABLES APT
WHERE AT.OWNER IN ('CISADM')
AND ATP.TABLE_OWNER(+)=AT.OWNER
AND APT.OWNER(+)=AT.OWNER
AND ATP.TABLE_NAME(+)=AT.TABLE_NAME
AND APT.TABLE_NAME(+)=AT.TABLE_NAME
ORDER BY ATP.TABLE_NAME,ATP.PARTITION_POSITION;
--

could you please suggest what wrong with this query or query to find table space used for both non part and each table partition table space. Thanks in advance..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2013
Added on Dec 9 2012
10 comments
3,149 views