Results 1 to 10 of 10
  1. #1
    Join Date
    Mar 2007
    Posts
    8

    Unanswered: how to execute reorg command in java code

    I need to Sometimes delete large bulk of data from tables with NLI, and after first DELETE operations, the performances of which on those tables which had been cleared became very low. With some research, I found the command reorg. I tried it,and the performances are improved a lot.
    Now,I need to execute the reorg command in java using jdbc,but the reorg can't be recognized as a correct SQL statement. My DB2 version revealed by db2level is v8.1.7.445 with the fixpack versioned as 7,so I don't have the procedure ADMIN_CMD. I have tried to update the fixpack, but I am frustrated and confused by the DB2's long download list of update.
    Can anybody give me some good advice about how to execute reorg command in java code in my case. Thanks in advance.

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Fixpacks download page:
    http://www-306.ibm.com/software/data...ownloadv8.html

    Execute two following commands at db2 command prompt:
    db2level (this command returns version and fixpack lavel)
    db2licm -l (-l is for license; this command returns edition level)

    Hope this helps,
    Grofaty

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    REORG is a DB2 command and not a SQL statement. Therefore, you can't issue it through CLI/JDBC.

    Installing a newer FP is easy. Go to the DB2 UDB support page and then click your way through (Version 8 -> platform -> regular FP).
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  4. #4
    Join Date
    Mar 2007
    Posts
    8
    Can I install the FP10 derectly on FP7 which is my current PF version? I notice that there are serveral download items about each version's FP, and in my case of retriving the ADMIN_CMD procedure, do I need to download them all or just partially? I really don't have any experience on installing a FP, so I need your help again. Thanks!

  5. #5
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    If you have a FP7 you can install FP10 at the top of FP7. Do you have any reason not to install FP14?

    What is your operating system and version?
    Hope this helps,
    Grofaty

  6. #6
    Join Date
    Mar 2007
    Posts
    8
    the current developing enviroment involves Windows Xp operating systems. The final running enviroment will be on AIX machine with LINUX operationg system. But I don't know the details about that. My DB2 version is 8.1.7.445.
    I want to stall FP10,because people say ADMIN_CMD is introduced in that version. And I see there are serveral download items with FP10, should I download and install them all?

  7. #7
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,
    Quote Originally Posted by Wong Tseng
    I see there are serveral download items with FP10, should I download and install them all?
    No. You only download fixpack for edition you have installed on your Windows computer.You need to execute command db2licm -l to check out what edition you have installed. Under the "Product Name" is edition displayed.

    You most probably have installed one of:
    - DB2 Personal Edition
    - DB2 Workgroup Server Edition or DB2 Workgroup Server Unlimited Edition
    - DB2 Enterprise Server Edition

    So you need to download and install only one fixpack.

    If the above command returns more than one "Product name" you need to download all fixpacks of the product name.

    Hope this helps,
    Grofaty

  8. #8
    Join Date
    Mar 2007
    Posts
    8
    Thank you a lot.
    Last edited by Wong Tseng; 03-05-07 at 03:39.

  9. #9
    Join Date
    May 2006
    Posts
    82
    REORG is a DB2 utility.It could be either offline or online REORG.
    All utilies in DB2 understands only control statments and NOT SQL statements.
    Stolze has already pointed out this. I'm not sure whether you can initiate the utility from Java application.

    Before coming to the conclusion, REORG will increase the performance there would be many points to think.

    What kind of tablespace is that ..? (SIMPLE,SEGMENTED,PARTITIONED )
    Is there any clustering index built on that table..?
    Sometimes just running the RUNSTATS would also makes difference.
    RUNSTATS requires less resources compared to REORG.
    I'm not sure about your scenario.

  10. #10
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Quote Originally Posted by Wong Tseng
    Can I install the FP10 derectly on FP7 which is my current PF version? I notice that there are serveral download items about each version's FP, and in my case of retriving the ADMIN_CMD procedure, do I need to download them all or just partially?
    As I said: download the "regular FixPak", then read the README file that comes with the FP and follow the steps described there.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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