Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Location
    USA
    Posts
    53

    Unanswered: Table partitioning

    With table partitioning, does each partition gets its own table ID in the catalog? What happens to the table ID during a partition detach or attach?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    There is only one row in syscat.tables for a table (with or without table partitions). There is another catalog table which keeps track of the partitions.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Jul 2009
    Location
    USA
    Posts
    53
    I see SYSCAT.DATAPARTITIONS. Two columns of interest

    DATAPARTITIONID - Identifier for the data partition.
    PARTITIONOBJECTID - Identifier for the data partition within the table space.


    What is the difference between them? Which one becomes the table ID in SYSCAT.TABLES when a partition gets detached and becomes a stand-alone table?

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    When you detach a partition into a new table, I believe that DB2 just assigns the next available table id, just like whenever any table is created. Why don't you try it?

    I don't recall that there is any relation in the catalog between a table created via detach partition, and the original table or information in SYSCAT.DATAPARTITIONS. The way the relationship is normally associated is by careful naming of the table created via detach partition.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Jan 2009
    Location
    Zoetermeer, Holland
    Posts
    746
    Everything works fine except db2pd

Posting Permissions

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