DB2 - L

 View Only
  • 1.  Increasing active log size

    Posted Mar 10, 2022 06:18 AM
    I need to increase the size of some active logs, not all, that were sized incorrectly.
    According to IBM doc, it instructs to delete ALL the active logs except the current active logs.
    Do I need to delete ALL "non current" active logs? Or can I just delete the ones I want to resize?


  • 2.  RE: Increasing active log size

    Posted Mar 10, 2022 08:17 AM



    It's not whether the DBA is paranoid; it's whether they're paranoid enough. That's your philosophical answer. 


    I can't give you a technical answer on whether you can get away with your idea.  But I'd STOP the member/subsys, then delete/define all the non-actives.  Not complying with IBM's instructions is probably a "well, you get to keep the pieces" situation if it doesn't work.


    Philip Sevetson

    Computer Systems Manager

    New York


  • 3.  RE: Increasing active log size

    Posted Mar 11, 2022 08:23 AM
    If you have the DASD to spare...

    * Allocate your new active logs with attributes similar to the existing ones, but with a larger size.
    * Initialize them with DSNJLOGF
    * Add them to the log inventory - this can be done dynamically, or using the old-fashioned DSNJU003 if you can stop the subsystem.
    * Drive an ARCHIVE LOG command, review the messages, verify that Db2 switches to the new logs. Verify with the DIS LOG command.
    * Delete the old, undersized logs from the bootstrap inventory.
    * Important - make sure the archives that cover that same RBA/LRSN range remain available, and do NOT physically delete the old active log datasets until the RBA/LRSN range is no longer relevant, so you can add them back in, should a catastrophe occur.

    That's how I'd prefer to do it.

    If you want to retain the same naming standard, you could create a TEMP set of active logs, move Db2 onto those logs, and then rename all your old logs, create new logs with the old names, and delete and add those names in the BSDS.

    I am pretty sure I've used IDCAMS REPRO and done the current name -> old, copy, new -> current name trick. But it's not as "clean".

    Mark Wieczorkowski
    Db2 Systems Programmer, SSA/DCS
    Principal - Solipsistic, LLC

  • 4.  RE: Increasing active log size

    Posted Mar 20, 2022 06:01 PM
    I may be too late, but if you can stop DB2, I have used:
    1-Stop DB2
    2-Allocated new larger active log dataset eg:
         MODEL('hlq.D??1.LOG1.DS01') LINEAR ) -
        DATA (NAME(hlq.D??1.LOG1.DS01.DATA.NEW) )
    3-IDCAMS copy current to new
    4-IDCAMS Alter current to old
    5-IDCAMS Alter new to current
    6-Start DB2. After the logs are used, DB2 will use the new space.

    This way you have a backout :) and no change to BSDS.

    GabrielPellyDXC Technology

  • 5.  RE: Increasing active log size

    Posted Mar 21, 2022 09:02 AM



    1.       I like the simplicity here.

    2.       But.
    If you're copying the old contents to the new, larger contents, then the tracks (CAs?) in the new dataset, which lie "Beyond" the size of the old dataset (Higher RBA than the High-Alloc-RBA of the old dataset) are unformatted, right?  Is that a problem for a DB2 Active Log file (particularly in a rollback)?





    Philip Sevetson

    Computer Systems Manager


    5 Manhattan West

    New York, NY 10001


    917-991-7052 m

    212-857-1659 f



  • 6.  RE: Increasing active log size

    Posted Mar 21, 2022 05:05 PM
    Hi Phil,
    1- simple is always good- as long as it works :)
    2-Active log file is unformatted - Correct.
    Once DB2 starts, the 'active' log file is 'unchanged'. Once it swaps to the next available log (and subsequent), DB2 will use all the allocated space - like it knows what its supposed to do.
    As part of testing, you could   archive log   and examine the results.
    I did not specifically test the rollback before the first swap, as I    archived log   straight away. Subsequent disaster recovery tests where successful.

    BTW: log file high RBA is calculated by:  1000(CYL) * 15(TRK/CYL) * 12(BLOCK/TRACK) * 4096(BLOCK SIZE) - 1
    BTW2: I last ran this procedure on DB2 V11.


    Gabriel Pelly DXC Technology

  • 7.  RE: Increasing active log size

    Posted Mar 21, 2022 05:18 PM



    Thank you :-)


    12 blocks per track, innit?  Hmm. I wonder if there's anyone out there still using a 3380 track build... Lord knows everything _else_ IBM ever offered for sale is still running _somewhere_.



    Philip Sevetson

    Computer Systems Manager

    New York, NY 10001