Re: rowids and logical logs and fragmented tables
Posted in 2009
the_duke_of_hazzard wrote: > I searched for this in the mailing list with no joy. > > BACKGROUND > ============ > > We have a script which parses logical logs and produces a text output > of the transactions in parallel, so that transaction behaviour can be > viewed synchronically for debugging purposes. Handy for long-held > transactions blocking others, deadlocks etc.. > > The information logged includes the table name (grokked from the > systable info) and the rowid as reported by the logs when relevant, eg > for HUPDATE here: > > http://publib.boulder.ibm.com/infocenter/idshelp/v10/topic/com.ibm.adref.doc/adref260.htm?resultof=%22%6c%6f%67%69%63%61%6c%22%20%22%6c%6f%67%69%63%22%20%22%6c%6f%67%22%20%22%66%6f%72%6d%61%74%22%20 > > We then use the rowid to track down the row we are interested in. > > PROBLEM > ========= > > The problem we are having is that the rowids reported by the logs > obviously don't exist in fragmented tables (that have no rowids) - > fine. > > So how do we map the "rowids" reported by the logical log to the rows > in the db? I've not been able to find a way. > > TIA, > > Ian I'm writing without searching... Not even in the FM (fabulous...). But I would say that what you get from the logs is a partition ID and a row ID. A fragmented table per si has no rowids, but it is built of several partitions and each one has a rowid (and different partitions will have different table rows with the same rowid, which is why the table itself has no rowids). To obtain the table partnum you can see the sysmaster:syspthdr.lockid field. Please check carefully before use! :) By the way... what you're doing is not supported (in the sense that logical logs structure is subject to change without notice etc. bla.. bla.. bla..) In 11.50.xC3 IBM introduced a little thing called Change Data Capture, something that allows us to interface with Data Mirror (one of the companies bought by IBM). It allows you to extract info from the logical logs using a published API. The feature is new, and hopefully will be further enhanced in a near future. Keep an eye on it... Regards. Regards. -- Fernando Nunes Portugal http://informix-technology.blogspot.com My email works... but I don't check it frequently...