Total Pageviews

471

Monday, June 27, 2011

how to restore MQ journals

3 comments:

  1. Please find the DSPJRN command to restore the MQ Journals.



    DSPJRN JRN(LIB1/JRNNAME)

    RCVRNG(LIB2/JRNRCVSTART LIB2/JRNRCVEND)

    FROMTIME(FROMDATE FROMTIME)

    TOTIME(TODATE TOTIME)

    OUTPUT(*OUTFILE)

    OUTFILFMT(*TYPE5)

    OUTFILE(LIB3/OUTFILENAME)

    ENTDTALEN(*CALC)

    NULLINDLEN(*CALC)





    JRNNAME - Specifies the journal from which the journal entries are retrieved.

    LIB1 - Library where the journal was retrieved.

    JRNRCVSTART - Specifies the starting Journal receiver used to extract Journals.

    JRNRCVEND - Specifies the ending Journal receiver used to extract Journals.

    LIB2 - Library where the Journal receivers are stored.

    FROMDATE and FROMTIME - Specifies the Date and time from which the Journals to be retrieved.

    TODATE and TOTIME - Specifies the Date and time up to which the Journals to be retrieved.

    OUTFILENAME - Specifies the file name where the MQ journals will get restored.

    LIB3 - Specifies the Library of the file where MQ journals will get restored.

    ReplyDelete
  2. Please find some more detailed info on MQ journals


    WORKING WITH JOURNALS
    Journaling support is the main component of the MQSeries for OS/400 recovery operations. Journals are used to record changes to objects before the change is applied to the object. Replaying the data recorded in the journal is an example of the type of recovery strategy used.

    There are two types of journals, both located in the library QUSRSYS/:
    1. AMQAJRN - Local journals that detail and manipulate updates to local objects
    2. AMQRJRN - Remote journals that detail and manipulate channel synchronization and the flow of messages over communication links

    Journals have associated journal receivers containing information being journalized. Journal receivers are objects that can reach full capacity. The journal receivers are detachable when full and are replaced one at a time in two different ways. Message queue managers detect when local journal receivers fill up (because they monitor the associated message queue) and will automatically replace the receiver with the next new one named in the sequence. On the other hand, remote journal receivers are not monitored and the User is required to attach a new remote journal receiver when it is required.

    Naming Conventions for Journals
    Local journal receiver: AMQAxxnnnn where nnnn is decimal 0000 to 9999 and x is a character 0-9, A-Z.
    Remote journal receiver: AMQRxxnnn where nnnn is decimal 0000 to 9999 and x is a character 0-9, A-Z.

    The diagram below depicts the sequence of events when an MQM object is updated:
    1. A represents the object unchanged and journal unchanged.
    2. B represents a journal entry written to the journal defining a Put operation on the queue.
    3. C represents the update made to the queue.
    4. D represents the journal entry written to the journal defining a Get operation from the queue.
    5. E represents the update made to the queue.






    Persistent information related to an object is recorded in the local journals. Any MQSeries for OS/400 object, which becomes damaged or corrupted, can be rebuilt from the data retained in these journals. The recovery capability begins with the captured representations of the *USRSPC object at point in time A, through point in time E. The User can consequently recover persistent messages after a system failure by restoring the saved object and replaying the journal entries starting from point in time A. The MQSeries for OS/400 retains particular entries within the journal receivers and at startup can replay the entries in order of occurrence.

    To restore a backed-up journal receiver (which has been removed from a library), use the Restore Object command (RSTOBJ): RSTOBJ OBJ(QMQMDATA/AMQA000005) OBJTYPE(*JRNRCV)

    If a series of journal receivers need to be restored, we recommend restoring them individually in reverse chronological order. To associate the restored journal receivers with their journals, use the WRKJRNA command.

    ReplyDelete