Automatic deletion of journal receivers
If you choose system journal receiver management, you can also have the system delete journal receivers
that are no longer needed for recovery. You can only specify this if you are using system journal receiver
management.
The system can only evaluate whether a receiver is needed for its own recovery functions, such as
recovering access paths or rolling back committed changes. It cannot determine whether a receiver is
needed to apply or remove journaled changes.
42 IBM i: Journal Management
Attention: Use automatic deletion of journal receivers with care if you use save-while-active operations
to save objects before they reach a commitment boundary. Ensure that you save the journal receivers
before the system deletes them. If an object is saved before it reaches a commitment boundary it can have
partial transactions. To avoid data loss you must have access to the journal receivers that were attached
during the save-while-active operation when you restore the objects with partial transactions.
The system will automatically delete journal receivers if you do one of the following: v Specify Delete receivers when no longer needed in the IBM Navigator for i Change Receivers or
Journal Properties dialogs. v Specify DLTRCV (*YES) in the Create Journal (CRTJRN) or Change journal (CHGJRN) commands.
However, even if you select one of the previous items, the system cannot delete the journal receiver if
any of the following conditions is true: v An exit program that is registered for the Delete Journal Receiver exit point
(QIBM_QJO_DLT_JRNRCV) indicates that the receiver is not eligible for deletion. v A journal has remote journals associated with it, and one or more of the associated remote journals
does not have a full copy of this receiver. v The system could not get the appropriate locks that are required to complete the operation. v The exit program registration facility was not available to determine if any exit programs were
registered.
If you use system delete-receiver support, you must ensure that your environment is suitable. You must
also regularly check the QSYSOPR message queue and the message queues that are assigned to your
journals. v If the system cannot complete the DLTJRNRCV command for any of the above reasons, it retries every
10 minutes (or the value you specify on the DLTRCVDLY parameter). It sends a CPI70E6 message to
the journal's message queue, and to QSYSOPR message queue. If this occurs, you might want to
determine why the operation cannot be performed and either correct the condition or run the
DLTJRNRCV command. v If the system cannot complete the command for any other reason, it sends a CPI70E1 message to the
message queue that is assigned to the journal. If you have not specifically assigned a message queue to
the journal, the message will be sent to the QSYSOPR message queue. Look at the messages in QHST
to determine the problem. After you correct the problem, use the DLTJRNRCV command on the
specific journal receiver. Do not select to have the detached journal receiver deleted if you might need it for recovery or if you
want to save it before it is deleted. The system does not save the journal receiver before deleting it. The
system does not issue the warning message (CPA7025) that it sends if a user tries to delete a receiver that
has not been saved.
Examples of when you might specify automatic journal deletion include: v You are journaling only because it is required to use commitment control. v You are journaling for explicit access-path protection. v You are replicating the journal receiver to another system through the remote journal function, and that
system is providing the backup copy of the journal receiver. Delaying the next attempt to delete a journal receiver
If you are using the CRTJRN or CHGJRN command, you can use the Delete Receiver Delay Time
(DLTRCVDLY) parameter. The system waits the time you specify (in minutes) with the DLTRCVDLY
parameter before its next attempt to delete a journal receiver that is associated with the journal when one
of the following is true: v The system cannot allocate a needed object.
Chapter 3. Local journal management 43
v You are using an exit program, and the exit program votes no. v You are using remote journaling and the receiver has not been replicated to all the remote journals.
If you do not specify this parameter, the system waits ten minutes, which is the default.
Save your system while it is active has instructions for saving an object with transactions in a partial
state. Example: Recover objects with partial transactions has instructions for recovering objects with
partial transactions.
Paul
From: Jack Woehr <jwoehr@xxxxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, August 17, 2021 3:35 PM
To: Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>; Tyler, Matt <matt.tyler@xxxxxxxxxxxxxx>
Cc: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Journal Receiver automating aged deletion
________________________________
CAUTION: This email originated from outside of the PENCOR network. Do not click on any links or open attachments unless the sender is known, and the content is verified as safe.
________________________________
Thanks Matt, Paul, will check out these solutions.
Also am playing with example of Retrieve Journal Receiver Information (QjoRtvJrnReceiverInformation) API<
https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fwww.mcpressonline.com%2fforum%2fforum%2fx%2darchive%2dthreads%2dstarted%2dbefore%2d01%2d01%2d2002%2fanalysis%2f3056%2djournal%2dinformation&umid=2dc4ae77-eb70-4aa0-8866-452ff6ce459f&auth=438b0784514c1757bd202125ca4db8b0abdb021e-1d527134eb56be17ee77ff4dd6b2137a8a43a1ef> which I found.
On Tue, Aug 17, 2021 at 1:20 PM Tyler, Matt <matt.tyler@xxxxxxxxxxxxxx<mailto:matt.tyler@xxxxxxxxxxxxxx>> wrote:
Try this
-- category: Custom
-- description: SYS - Find and remove Journal Receivers older than 2.9
SELECT Objlongname , Objlongschema , Restore_Timestamp , ( X.Restore_Timestamp +3 days ) as RestorePlus3, Current_Timestamp as Current_Timestamp, ObjText
-- , cmdexc('DLTJRNRCV JRNRCV(' concat trim(ObjlongSchema) concat '/' concat trim(Objlongname) concat ')')
, varchar('DLTJRNRCV JRNRCV(' concat trim(ObjlongSchema) concat '/' concat trim(Objlongname) concat ')', 1024) as CleanUpCommand
FROM TABLE (QSYS2.OBJECT_STATISTICS('[jrnlib] ','JRNRCV') ) AS X
where ( X.Restore_Timestamp +3 days ) < Current_timestamp
;
On Tue, Aug 17, 2021 at 1:23 PM Steinmetz, Paul <PSteinmetz@xxxxxxxxxx<mailto:PSteinmetz@xxxxxxxxxx>> wrote:
Jack,
Would setting the journal to automatically delete receivers work for you.
Delete receivers . . : *YES
--
Jack Woehr, IBM Champion 2021<
https://www.youracclaim.com/badges/528d23d6-087f-4698-8d17-d59688106ac4/public_url>
Absolute Performance, Inc.
12303 Airport Way, Suite 100
Broomfield, CO 80021
NON-DISCLOSURE NOTICE: This communication including any and all attachments is for the intended recipient(s) only and may contain confidential and privileged information. If you are not the intended recipient of this communication, any disclosure, copying further distribution or use of this communication is prohibited. If you received this communication in error, please contact the sender and delete/destroy all copies of this communication immediately.
As an Amazon Associate we earn from qualifying purchases.