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!

dba_segments and dba_tables count is mismatching

user7316227Mar 10 2015 — edited Mar 10 2015

Hi,

I am working on reorg the tablespace, i thought to consider the dba_segments view to move segments from one tablespace to other's and drop the old one, but when i query the dba_segments and dba_tables there is mismatch in count

SQL> select * from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE    11.2.0.3.0      Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production

SQL> select segment_name, segment_type, tablespace_name from dba_segments where owner='CTMARG_STG';

SEGMENT_NAME                   SEGMENT_TYPE       TABLESPACE_NAME
------------------------------ ------------------ ------------------------------
REF_BAN_SUBS_HIST              TABLE              AGGR_TBS

SQL> select table_name , tablespace_name from dba_tables where owner='CTMARG_STG';

TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
CTMARG_CONT_ANALYSIS           AGGR_TBS
CTMARG_CONT_ANALYSIS_MM        AGGR_TBS
CTMARG_CUSTOMER_SELECTION      AGGR_TBS
CTMARG_CUSTOMER_SELECTION_MM   AGGR_TBS
CTMARG_INTEC_CONTRIBUTION      AGGR_TBS
CTMARG_INTEC_CONTRIBUTION_MM   AGGR_TBS
CTMARG_REVENUE_CONT            AGGR_TBS
CTMARG_REVENUE_CONT_MM         AGGR_TBS
CTMARG_SUBS_INFO               AGGR_TBS
CTMARG_SUBS_INFO_MM            AGGR_TBS
CTMARG_SUBS_REV                AGGR_TBS

TABLE_NAME                     TABLESPACE_NAME
------------------------------ ------------------------------
CTMARG_SUBS_REV_MM             AGGR_TBS
CTMARG_USAGE_CONT              AGGR_TBS
CTMARG_USAGE_CONT_MM           AGGR_TBS
DIM_CALL_TYPE                  AGGR_TBS
REF_BAN_SUBS_HIST              AGGR_TBS

16 rows selected.

could anyone shed some light on it please

BR

PGR

This post has been answered by John Stegeman on Mar 10 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2015
Added on Mar 10 2015
7 comments
1,510 views