Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Posts
    369

    Unanswered: sql -291 error during reorg table

    need help-
    I need to reorg a bunch of tables on our production database.
    when I run the reorg command I keep getting the following error message:

    # db2 "reorg table schema.my_table use tempspace"

    SQL2216N SQL error "-291" occurred while reorganizing a database table.

    # db2 "? SQL2216N"

    SQL2216N SQL error "<sqlcode>" occurred while reorganizing a
    database table.

    Explanation: An error occurred during the reorganization of a
    database table.

    The utility stops processing.

    User Response: Look at the SQLCODE (message number) in the
    message for more information. Make changes and resubmit the
    command.

    How do I fix this problem when I am reorging tables? Thanks!
    Scott

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: sql -291 error during reorg table

    Check the status of the tablespace ...

    db2 list tablespaces show detail

    Cheers

    Sathyaram



    H:\>db2 ? sql0291n

    SQL0291N State transition not allowed on table space.

    Explanation: An attempt was made to change the state of a table
    space. Either the new state is not compatible with the current
    state of the table space, or an attempt was made to turn off a
    particular state and the table space was not in that state.

    Details can be found in the system error log and/or the database
    manager error log.

    User Response: Table space states change when a backup is taken,
    the load completes, the rollforward completes, etc., depending on
    the current state of the table spaces. Refer to the systems
    administration guide for further information about the table
    space states.

    sqlcode: -291

    sqlstate: 55039


    Originally posted by mixxalot
    need help-
    I need to reorg a bunch of tables on our production database.
    when I run the reorg command I keep getting the following error message:

    # db2 "reorg table schema.my_table use tempspace"

    SQL2216N SQL error "-291" occurred while reorganizing a database table.

    # db2 "? SQL2216N"

    SQL2216N SQL error "<sqlcode>" occurred while reorganizing a
    database table.

    Explanation: An error occurred during the reorganization of a
    database table.

    The utility stops processing.

    User Response: Look at the SQLCODE (message number) in the
    message for more information. Make changes and resubmit the
    command.

    How do I fix this problem when I am reorging tables? Thanks!
    Scott

Posting Permissions

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