0

I'm using the latest version of IBM Data Studio 4.1.2.0

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?

1

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') – Ian Bjorhovde Jan 16 '17 at 15:33
1
 CALL SYSPROC.ADMIN_CMD( 'REORG TABLE SCHEMA.TABLENAME' )
  • Jhonnatan, we prefer code snippets highlighted with appropriate tags, please don't roll back the edit. – mustaccio Apr 26 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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