IBM TechXchange Group

 View Only
  • 1.  Monitor for SQL Rollback

    Posted Fri January 12, 2024 01:40 PM

    Hi

    How can one monitor for any SQL Rollback? Especially for applications not written inhouse or source cannot be modified.

    Not sure if one can do  an exit program for this.

    Thanks

    Edward



    ------------------------------
    Edward Camilleri
    ------------------------------


  • 2.  RE: Monitor for SQL Rollback

    IBM Champion
    Posted Wed January 17, 2024 01:39 PM

    Dear Edward

    Rollback event is recorded in DB journal. You need to start DB journaling for tables of your interest and look in journal entries.  Since you did not mention which OS it is, I would give a sample for IBM i in which you can invoke DB2 service named DISPLAY_JOURNAL table function regularly and look for entries with Journal Code = C and Entry Type = RB.   More information here :

    DISPLAY_JOURNAL table function at  https:/   /www.ibm.com/docs/en/i/7.3?topic=services-display-journal-table-function   

    All journal entries by code and type at  https://www.ibm.com/docs/en/i/7.4?topic=information-all-journal-entries-by-code-type  



    ------------------------------
    Chance favors only the prepared mind.
    -- Louis Pasteur
    ------------------------------
    Satid S.
    ------------------------------



  • 3.  RE: Monitor for SQL Rollback

    Posted Wed January 17, 2024 01:43 PM

    Assuming LUW. Start with https://www.ibm.com/docs/en/db2/11.5?topic=monitor-progress-monitoring-rollback-process 

    Not sure if any of the more modern MON_GET... will help with this, but you could check that out as well



    ------------------------------
    Lennart Jonsson
    ------------------------------