lowering HWM

This is a discussion on lowering HWM within the ibm-db2 forums in Other Databases category; hello, I am working on bringing HWM down. what is the best way to do this ? i know db2dart but i am afraid if this locks database or tablespace etc. i am thinking of exporting all data, dropping tables, recreating tables and loading data back in. is there anyone who has worked with similar situation ? what is the best way to do this ? regards, db2admin...

Go Back   Database Forum > Other Databases > ibm-db2

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-11-2008, 04:47 PM
Default lowering HWM

hello,

I am working on bringing HWM down. what is the best way to do this ? i
know db2dart but i am afraid if this locks database or tablespace etc.
i am thinking of exporting all data, dropping tables, recreating
tables and loading data back in. is there anyone who has worked with
similar situation ? what is the best way to do this ?


regards,
db2admin
Reply With Quote
  #2  
Old 09-11-2008, 06:20 PM
Default Re: lowering HWM

On Sep 11, 3:47*pm, db2admin wrote:
> hello,
>
> I am working on bringing HWM down. what is the best way to do this ? i
> know db2dart but i am afraid if this locks database or tablespace etc.
> i am thinking of exporting all data, dropping tables, recreating
> tables and loading data back in. is there anyone who has worked with
> similar situation ? what is the best way to do this ?
>
> regards,
> db2admin


Try an offline REORG first.

Reply With Quote
  #3  
Old 09-12-2008, 04:16 AM
Default Re: lowering HWM

db2admin wrote:
> hello,
>
> I am working on bringing HWM down. what is the best way to do this ?


Let DB2 try to reduce the container allocations for the tablespace(s):

> Alter tablespace TS_XXXX reduce (ALL nnnn)


As Sanjuro suggests, best to REORG first... then the freespace is
contiguous and the HWM can reduced further.


Eric
Reply With Quote
  #4  
Old 09-12-2008, 11:24 AM
Default Re: lowering HWM

Hi,

the only way I can think of reliably reducing the HWM is to use
db2dart or drop the tablespace after all tables are dropped... The
latter is not better than the former.

What I did (in a test environment) is to reorg, then use

db2dart prestodb /rhwm /tsi ,

then stop DB2 from requiring an offline backup:

db2dart prestodb /chst /what dbbp off

then backup the tablespace

db2 backup Database prestodb tablespace to /dev/null

After that, the Database is reusable. However, I'm not sure now if an online
backup is enough of the tablespace to bring it out of check pending
mode, I did an offline backup.



db2admin wrote:
> hello,
>
> I am working on bringing HWM down. what is the best way to do this ? i
> know db2dart but i am afraid if this locks database or tablespace etc.
> i am thinking of exporting all data, dropping tables, recreating
> tables and loading data back in. is there anyone who has worked with
> similar situation ? what is the best way to do this ?
>
>
> regards,
> db2admin

Reply With Quote
  #5  
Old 09-12-2008, 11:43 AM
Default Re: lowering HWM

> db2dart prestodb /rhwm /tsi ,

I forgot to mention that you're not only concerned about the high
water mark, but also about the highest control page, which won't
automatically be removed by reorg'ing the tablespace. That's why I
used db2dart, to remove the control pages.
Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 09:44 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Integrated by bbpixel2009 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.