1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JDBC経由でDb2のREORGを実行する方法

Posted at

JDBC経由でREORGを実行したい

IBM Cloud上のDb2を使用した際に、Alter Tableしたところ、以降のリクエストでエラーが出るようになった。調べてみるとREORGすれば良いようなのだが、Cloudなので直接コマンドを打てない、、、

SQLとしてREORGを実行

以下のSQLを発行することで、REORGを実行することが可能なようです。
実際に試してみたところエラーが解消されました。
Call Sysproc.admin_cmd ('reorg Table [table name]');

参考
http://www.technicaladvices.com/2012/05/15/db2-calling-reorg-command-from-jdbc/

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?