MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2008

Re: Referential constraints and same journal?



fixed

FWiW: The requirement is specific to which UPDATE and/or DELETE rules are defined for the relationship. [As such] The Database Programming Guide describes the requirement in the section "Specifying referential constraint rules" under the heading "Ensuring data integrity with referential constraints".

http://www.google.com/search?q=%22referential+integrity%22+journaling+%22update+rule%22+%22delete+rule%22+v5r4+site%3Aibm.com
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic//dbp/rbafo.pdf
"Pg 254 System i: Database Database programming

Details: Specifying referential constraint rules — journaling requirements:

If you perform insert, update, or delete operations on a file that is associated with a referential constraint, and the delete rule, update rule, or both are other than *RESTRICT, you must use journaling.

You must journal both the parent and the dependent files to the same journal. In addition, you are responsible for starting the journaling for the parent and dependent files.

You can start the journaling for the parent and dependent files with the Start Journal Physical File (STRJRNPF) command.

If you are inserting, updating, or deleting records to a file associated with a referential constraint that has a delete rule, update rule, or both rules, other than *RESTRICT, commitment control is required. If you have not started commitment control, the system starts and ends the commit cycle automatically for you.

Related reference: Start Journal Physical File (STRJRNPF) command"

Regards, Chuck

Carmen Nuland wrote:
Where does it ever say in any of IBM's documentation that you have to
use the same journal for all files that are using referential
constraints?!? We just started using ref. constraints and just
realized the problem when we started getting:

CPF523C - Referential constraint journal error. Recovery: Change the
files so they are journaled to the same journal.

If we had known this ahead of time, we would have planned for it, but
now we have to change our whole journaling concept!

Carmen (just venting)





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact