I'm using the latest version of IBM Data Studio

I tried to reorg a table using IBM Data Studio after some alterations on the table with this command.

reorg table MYTABLE;

This command shows an error

REFRESH was expected instead of reorg

But even after using the REFRESH command, the table doesn't come out of the "reorg pending" state.

The same command when I tried it via the DB2 Command Line Processor worked perfectly fine.

Any suggestions on how to to enable the REORG command in Data Studio or is it not supported at all?


2 Answers 2


I guess you tried to run it in an editor window. YOu have to switch to

DB2 server Command Line Processor

in the Configuration tab of the editor. Do not forget to explicitly connect to your database

connect to sample ;
reorg table suppliers;

Alternatively you could switch to "Administer Databases" and run the reorg from the contect menu of a table:

enter image description here

  • 1
    Alternatively (from editor window): call sysproc.admin_cmd('reorg table suppliers') Jan 16, 2017 at 15:33
  • Jhonnatan, we prefer code snippets highlighted with appropriate tags, please don't roll back the edit.
    – mustaccio
    Apr 26, 2019 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.