DB2 IFI LRSN sequence question
Hi all, I've developed an IFCID 0306 used program to retrieve the log records from DB2 log. The program is used now under the Data Sharing Environment, i.e. LRSN is the key. But LRSN is not unique, and therefore a number of records may be addressed by the same LRSN. My question - could I be sure that when one applies IFI more than one time on the same scope, IFI ALWAYS returns the records with the same LRSN in the same order? In other words - could I maintain my own sequence counter, in addition to LRSN, to provide the unique access to any record. Best Regards Arie Kremer -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: DB2 IFI LRSN sequence question
Arie, LRSN is unique. The reason LRSN is used in Data Sharing is because the log RBA is not unique. LRSN's are guaranteed to be unique and ever-increasing, so you have no need for an programmatic sequence number. Wayne Driscoll Product Developer NOTE: All opinions are strictly my own. -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Arie Kremer Sent: Wednesday, October 29, 2008 11:05 AM To: IBM-MAIN@BAMA.UA.EDU Subject: DB2 IFI LRSN sequence question Hi all, I've developed an IFCID 0306 used program to retrieve the log records from DB2 log. The program is used now under the Data Sharing Environment, i.e. LRSN is the key. But LRSN is not unique, and therefore a number of records may be addressed by the same LRSN. My question - could I be sure that when one applies IFI more than one time on the same scope, IFI ALWAYS returns the records with the same LRSN in the same order? In other words - could I maintain my own sequence counter, in addition to LRSN, to provide the unique access to any record. Best Regards Arie Kremer -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: DB2 IFI LRSN sequence question
Wayne, I'm pity but you are wrong. Before DB2V9, LRSN is unique for the same member. Beginning from DB2V9, LRSN is unique only for the same page. When two updates occur inside the interval of 16 microseconds, thay may receive the same LRSN. See for example http://www.redbooks.ibm.com/redbooks/pdfs/sg247473.pdf page 114 On Wed, Oct 29, 2008 at 6:29 PM, Wayne Driscoll [EMAIL PROTECTED]wrote: Arie, LRSN is unique. The reason LRSN is used in Data Sharing is because the log RBA is not unique. LRSN's are guaranteed to be unique and ever-increasing, so you have no need for an programmatic sequence number. Wayne Driscoll Product Developer NOTE: All opinions are strictly my own. -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Arie Kremer Sent: Wednesday, October 29, 2008 11:05 AM To: IBM-MAIN@BAMA.UA.EDU Subject: DB2 IFI LRSN sequence question Hi all, I've developed an IFCID 0306 used program to retrieve the log records from DB2 log. The program is used now under the Data Sharing Environment, i.e. LRSN is the key. But LRSN is not unique, and therefore a number of records may be addressed by the same LRSN. My question - could I be sure that when one applies IFI more than one time on the same scope, IFI ALWAYS returns the records with the same LRSN in the same order? In other words - could I maintain my own sequence counter, in addition to LRSN, to provide the unique access to any record. Best Regards Arie Kremer -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: DB2 IFI LRSN sequence question
I missed that the 16 ms wait spin has been removed in DB2 9 NFM. However, the redbook is wrong for pre-version 9. According the DB2 V8 Data Sharing Planning and Admin Guide, the LRSN is a value derived from the store clock timestamp and synchronized across the members of a data sharing group by the Sysplex Timer. This clearly states that the LRSN is unique in the group, not just within the member. If it was only unique in the member, they could have continued using the LOG RBA. Anyway, to answer your question, I would doubt that in V9 you could guarantee that the log records will be returned in the EXACT order that they were written, unless you are only processing the logs for a local system (not requesting merge) if DB2 is retrieving log records from multiple log files, then I would doubt that you can count on the return sequence. Wayne Driscoll Product Developer NOTE: All opinions are strictly my own. -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Arie Kremer Sent: Wednesday, October 29, 2008 11:52 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: DB2 IFI LRSN sequence question Wayne, I'm pity but you are wrong. Before DB2V9, LRSN is unique for the same member. Beginning from DB2V9, LRSN is unique only for the same page. When two updates occur inside the interval of 16 microseconds, thay may receive the same LRSN. See for example http://www.redbooks.ibm.com/redbooks/pdfs/sg247473.pdf page 114 On Wed, Oct 29, 2008 at 6:29 PM, Wayne Driscoll [EMAIL PROTECTED]wrote: Arie, LRSN is unique. The reason LRSN is used in Data Sharing is because the log RBA is not unique. LRSN's are guaranteed to be unique and ever-increasing, so you have no need for an programmatic sequence number. Wayne Driscoll Product Developer NOTE: All opinions are strictly my own. -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Arie Kremer Sent: Wednesday, October 29, 2008 11:05 AM To: IBM-MAIN@BAMA.UA.EDU Subject: DB2 IFI LRSN sequence question Hi all, I've developed an IFCID 0306 used program to retrieve the log records from DB2 log. The program is used now under the Data Sharing Environment, i.e. LRSN is the key. But LRSN is not unique, and therefore a number of records may be addressed by the same LRSN. My question - could I be sure that when one applies IFI more than one time on the same scope, IFI ALWAYS returns the records with the same LRSN in the same order? In other words - could I maintain my own sequence counter, in addition to LRSN, to provide the unique access to any record. Best Regards Arie Kremer -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: DB2 IFI LRSN sequence question
1) In fact, I've received the same LRSN from different members in DB2V8!!! the LRSN is a value derived from the store clock timestamp and synchronized across the members of a data sharing group by the Sysplex Timer. means only that Sysplex provides the synchronized LRSN (Sysplex timestamp) for all the members, not that it is unique. In fact, up to DB2V8, the uniqueness of LRSN has been provided by the Log Manager, i.e. PER MEMBER! 2) Concerning the order. IFI CANNOT return the same LRSN records in the order they were written. It simply can not know that. IFI merges the logs using LRSN as a key. It means that it should use some specific merge strategy, for instance, firstly all the records from the first member, after - from the second and so on. And this means also that the same LRSN records are returned ALWAYS in the same order. But what happens if the IFI requests the last written records during the same spoken about 16 microseconds? Could it occur at all? If IFI has an internal delay and does not request records being created the last 16 ms, we obviously have the same order (all the records from the group are already written to the log). But if not - the order may be changed. On Wed, Oct 29, 2008 at 9:59 PM, Wayne Driscoll [EMAIL PROTECTED]wrote: I missed that the 16 ms wait spin has been removed in DB2 9 NFM. However, the redbook is wrong for pre-version 9. According the DB2 V8 Data Sharing Planning and Admin Guide, the LRSN is a value derived from the store clock timestamp and synchronized across the members of a data sharing group by the Sysplex Timer. This clearly states that the LRSN is unique in the group, not just within the member. If it was only unique in the member, they could have continued using the LOG RBA. Anyway, to answer your question, I would doubt that in V9 you could guarantee that the log records will be returned in the EXACT order that they were written, unless you are only processing the logs for a local system (not requesting merge) if DB2 is retrieving log records from multiple log files, then I would doubt that you can count on the return sequence. Wayne Driscoll Product Developer NOTE: All opinions are strictly my own. -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Arie Kremer Sent: Wednesday, October 29, 2008 11:52 AM To: IBM-MAIN@BAMA.UA.EDU Subject: Re: DB2 IFI LRSN sequence question Wayne, I'm pity but you are wrong. Before DB2V9, LRSN is unique for the same member. Beginning from DB2V9, LRSN is unique only for the same page. When two updates occur inside the interval of 16 microseconds, thay may receive the same LRSN. See for example http://www.redbooks.ibm.com/redbooks/pdfs/sg247473.pdfpage 114 On Wed, Oct 29, 2008 at 6:29 PM, Wayne Driscoll [EMAIL PROTECTED]wrote: Arie, LRSN is unique. The reason LRSN is used in Data Sharing is because the log RBA is not unique. LRSN's are guaranteed to be unique and ever-increasing, so you have no need for an programmatic sequence number. Wayne Driscoll Product Developer NOTE: All opinions are strictly my own. -Original Message- From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf Of Arie Kremer Sent: Wednesday, October 29, 2008 11:05 AM To: IBM-MAIN@BAMA.UA.EDU Subject: DB2 IFI LRSN sequence question Hi all, I've developed an IFCID 0306 used program to retrieve the log records from DB2 log. The program is used now under the Data Sharing Environment, i.e. LRSN is the key. But LRSN is not unique, and therefore a number of records may be addressed by the same LRSN. My question - could I be sure that when one applies IFI more than one time on the same scope, IFI ALWAYS returns the records with the same LRSN in the same order? In other words - could I maintain my own sequence counter, in addition to LRSN, to provide the unique access to any record. Best Regards Arie Kremer -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html -- For IBM-MAIN subscribe / signoff / archive access instructions