Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2002
    Chennai, India

    Unanswered: Type 1 to Type 2 index conversion options

    DB2 UDB v7.2

    When migration of v7.2 database to v8, the indexes still exist as a type 1 index in v8.

    We can convert the indexes to type 2 by a REORG of Index with CONVERT option. However, the question is whether dropping all indexes on the table and recreating them would create type 2 indexes or type 1 indexes?

    Ofcourse, if type 1 indexes already exist in V8 then any new index will be a type 1 index again.


  2. #2
    Join Date
    May 2003
    From the manual:
    "All indexes created by DB2 prior to Version 8 are type-1 indexes. All indexes created by Version 8 are Type 2 indexes, except when you create an index on a table that already has a type 1 index. In this case the new index will also be of type 1."

    My interpretation is that if you drop all the indexes on a table, and then recreate them, they will be type-2. However, if you have a primary key, you must drop it in order to drop the unique index.
    Last edited by Marcus_A; 12-15-05 at 21:41.
    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
    Sep 2002
    Dropping all the indexes and then recreating will accomplish the task. But I will recommend CONVERT, I have used it many times for conversion and you dont' have to worry about primary key or data corruption.

Posting Permissions

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