Discrepancies: USER_TABLES and USER_SEGMENTS
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: Discrepancies: USER_TABLES and USER_SEGMENTS

Hybrid View

  1. #1
    Join Date
    Apr 2010
    Posts
    5

    Angry Discrepancies: USER_TABLES and USER_SEGMENTS

    In a schema HR (deployed when i installed Oracle 10g rel. 2), i run this statement:
    SQL> select segment_name from user_segments where segment_type='TABLE';

    and the result is:
    SEGMENT_NAME
    ------------------------------------------------------------------------
    REGIONS
    LOCATIONS
    DEPARTMENTS
    JOBS
    EMPLOYEES
    JOB_HISTORY

    Selezionate 6 righe.

    If I run this statement:
    SQL> select table_name from user_tables;

    instead, the result is:
    TABLE_NAME
    ------------------------------
    REGIONS
    LOCATIONS
    DEPARTMENTS
    JOBS
    EMPLOYEES
    JOB_HISTORY
    COUNTRIES

    Selezionate 7 righe.

    Why i don't see COUNTRIES table in USER_SEGMENTS ?

    Regards,
    Dave

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    run...
    select table_name, partition_name from user_tab_partitions;
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  3. #3
    Join Date
    Mar 2006
    Location
    Charlotte, NC
    Posts
    865
    also run ....

    SELECT OBJECT_TYPE FROM USER_OBJECTS WHERE OBJECT_NAME='COUNTRIES';

    Thanks,
    Vijay Tummala

    Try hard to get what you like OR you will be forced to like what you get.

  4. #4
    Join Date
    Apr 2010
    Posts
    5

    for PAVB

    SQL> select table_name, partition_name from user_tab_partitions;

    no rows selected.

  5. #5
    Join Date
    Mar 2010
    Location
    Los Angeles
    Posts
    20
    Did you tried the below which was told by vijay?

    SELECT OBJECT_TYPE FROM USER_OBJECTS WHERE OBJECT_NAME='COUNTRIES';

    VJ

  6. #6
    Join Date
    Apr 2010
    Posts
    5

    for VIJAY

    Sql> select object_type from user_objects where object_name='countries';

    object_type
    -------------------
    table

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width