What is the difference between MIGRATE SQL, UNDO SQL and REDO SQL in Log Master?

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    Log Master for DB2


    What is the difference between Migrate SQL, UNDO SQL and REDO SQL in Log Master?


    Generate Migrate SQL to move data to shadow tables, or migrate specific updates to another system for test or audit.

    Generate UNDO SQL to reverse the effects of a problem transaction.

    For example, applying UNDO SQL can change INSERT statements to DELETE statements. When you generate UNDO SQL, you are also preparing transactions to be backed out in the correct order.

    In contrast to an UNDO operation (which creates SQL statements to back out problem transactions) a REDO operation creates SQL statements that you can use to reapply the valid transactions after a recovery action, while omitting the problem transactions defined by your time frame and filter.

    Because a REDO operation omits the problem transactions, when you perform a recovery and then execute REDO SQL, you can restore the table spaces to a current state that does not include the problem transactions.

    For example, if undesirable changes are made to a database, to resolve the problem, the database administrator (DBA) can perform the follows actions:

            ■ Use Log Master to generate REDO SQL, defining the undesirable changes with a time frame and filter.

            ■ Use a utility program to recover the database to a point in time before the undesirable changes.

             ■ Execute the REDO SQL and re-apply all of the changes after that point in time, except the undesirable changes.

    When you generate REDO SQL statements, Log Master starts by selecting all of the log records within the table spaces defined (directly or indirectly) by your filter. To generate REDO SQL, your filter must refer to at least one specific DB2 object, such as a table space, table, or column.

    Log Master also selects all of the log records within the period between the REDO recovery point and the current time. To generate REDO SQL, you must define a REDO recovery point. From this set of log records, Log Master excludes all of the log records that are selected by your filter, and included within your time frame.

    Ensure that you generate REDO SQL before you recover the database. When you generate REDO SQL, Log Master extends the end point of the log scan to the current date and time, which causes Log Master to process more log records than you might expect.


    Article Number:


    Article Type:


      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles