DB2 Online Reorg

I've been using online reorgs since they became available in DB2 8.1. In fact I use them all the time to keep my client databases tuned and available 24x7, which enables my databases to stay up for many months. Here are some examples: 

table reorg: 

"db2 reorg table db2admin.accounts inplace allow write access" 

Monitor the status of the reorg by using the following command: "db2pd -d mydb -reorgs"

You will see if the reorg is started and how far it is or if it is done. 

You can pause an online table reorg and resume it later. Use the following commands: "db2 reorg table db2admin.accounts inplace pause" 
"db2 reorg table db2admin.accounts inplace resume" 
And you can stop an online reorg by using the stop keyword as follows: 
"db2 reorg table db2admin.accounts inplace stop". 

A reorg that has been paused may be resumed. A reorg that has been stopped cannot be resumed. In this case you will need to start it again from the beginning. 

I have most of my clients setup for weekly reorgs based on the output of reorgchk, although some tables and indexes need them done nightly. If you aren't doing reorgs you need to get going. Hope this helps. Later. Phil
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值