lowering HWM

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • db2admin

    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
  • Sanjuro

    #2
    Re: lowering HWM

    On Sep 11, 3:47 pm, db2admin <jag...@gmail.c omwrote:
    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.

    Comment

    • Eric.Jones

      #3
      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

      Comment

      • w.l.fischer@googlemail.com

        #4
        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 <tbspaceid>,

        then stop DB2 from requiring an offline backup:

        db2dart prestodb /chst /what dbbp off

        then backup the tablespace

        db2 backup db prestodb tablespace <tbspacenamet o /dev/null

        After that, the DB 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

        Comment

        • w.l.fischer@googlemail.com

          #5
          Re: lowering HWM

          db2dart prestodb /rhwm /tsi <tbspaceid>,

          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.

          Comment

          Working...