Results 1 to 9 of 9

Thread: Rebuild Index

  1. #1
    Join Date
    Aug 2010
    Posts
    12

    Unanswered: Rebuild Index

    I've been search for the past couple days on this and have yet to find an easy answer.

    I need to rebuild all indexes for a database. I believe some indexes are having problems so I would like to rebuild them to rule indexes out as a possible cause for the problem.

    Everything I find on rebuilding indexes are for zOS, which doesnt seem to be very helpful as I'm running on a windows environment.

    For example the database name is: Test
    I have the following tables: Table1, Table2, Table3
    I have the following tablespace that contains all indexes for the above tables: USERSPACE2

    How do i run a manual rebuild for this database?

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    What do you think is the problem with the indexes?

    You can REORG the indexes, or you can drop them and recreate them.

    Andy

  3. #3
    Join Date
    Aug 2010
    Posts
    12
    So there is no automated way to recreate indexes in DB2 like you can in MSSQL?

    We are having random issues when a certain database is accessed it kills the DBM for the instance. Not much info is in db2diag or in any trap files but it seems to happen when selecting certain information.

    Also helpful that you cant open some of the debugging files without opening a ticket with IBM for them to decrypt it....

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    It sounds like the problem is with certain queries, not the indexes. Have you looked at the access plans for those queries?

    Andy

  5. #5
    Join Date
    Aug 2010
    Posts
    12
    doing a little more digging, i find that running a specific query against a specific "View" causes the DBM to crash, and ideas?

  6. #6
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Given the amount of information you have provided, I would say you have an issue with a certain query against a certain view.

    Andy

  7. #7
    Join Date
    Aug 2010
    Posts
    12
    I take my last post back, it must have been a coincidence that i ran the query when the DBM failed again.

    I reran the query several times again and the DBM did not fail. False alarm..

  8. #8
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    I am still clueless as to what the problem is in the first place. What DB2 version are you on? Tell us about the server that DB2 is running on. 32/64 bit? Amount of RAM? Windows version? DBM Config? DB Config? The more information you supply, the better answer you will receive.

    Andy

  9. #9
    Join Date
    Aug 2010
    Posts
    12
    Well I should probably start a new thread as this one was just a question about rebuilding indexes

Posting Permissions

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