Results 1 to 3 of 3
  1. #1
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737

    Unanswered: List Table Parititions

    I have a table partitioned in DB2 V9.5 with something similar to the following:

    CREATE TABLE orders(id INT, shipdate DATE, )
    PARTITION BY RANGE(shipdate)
    (
    STARTING '1/1/2006' ENDING '12/31/2008'
    EVERY 3 MONTHS
    );

    Once the table is created and data has been loaded, how do I see what partitions exist so they can be detached, dropped, etc?
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    syscat.datapartitions?
    ---
    "It does not work" is not a valid problem statement.

  3. #3
    Join Date
    Oct 2004
    Location
    DELHI INDIA
    Posts
    338
    Thats correct Nick.

    To see on which filed you have your range partition defined, you can use SYSCAT.DATAPARTITIONEXPRESSION.

    And to see the definition for each partitions so that you can detach some of them, you need to use "select datapartitionname,lowvalue,highvalue from syscat.DATAPARTITIONS where tabname = 'TB_TEST' with ur"

    Jayanta Datta
    DB2 UDB DBA
    IBM India, Global Delivery
    New Delhi

Posting Permissions

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