Re: Limited Transaction Logging
Posted in 1996
In <32C40EBD.64FD@worldnet.att.net> Jon Perelstein <loki173@worldnet.att.net> writes: >Is it possible to implement limited transaction logging in Informix? >We have a very large system (in terms of number of programs) that does >not use any transaction logging whatsoever. As a short term fix to >address our highest areas of risk, we would like to immediately >implement transaction logging for certain critical activity, and then go >back and do the rest of the system. Unfortunately, we are currently >"between" DBAs (not that our former DBA was able to answer that >question), and don't have anybody here who can tell us whether this is >possible. >Can this be done? Can we implement transaction logging within selected >programs only, and can we implement transaction logging for selected >inserts/updates/deletes within those programs? Yes, but not as an actual "mode" of logging. Simply turn logging on (after archive level 0), and add BEGIN TRANSACTION/COMMIT WORK/ROLLBACK WORK statements to those programs that want them. Make sure you've got a good idea of how the concurrency control works before you change anything, and take a good long look at the SET ISOLATION command for use in the new transactions. Remember that an OPENed cursor does not lock all records (even at REPEATABLE READ) until they are actually accessed (or changed if not at REPEATABLE READ), so if you have transactions where all the records that will be accessed need to be guaranteed before the tranaction commences, you will need to SET ISOLATION TO REPEATABLE READ and FETCH LAST (or similar) on the critical cursors to scan and lock all the needed records. Of course, lock limits and performance may limit you here, and each of your programs may need to be checked as how they are currently handling encountered locks. I assume you've got your logfiles all setup and ready to fire, if not there may be some tuning required prior to implementation. The DB administrator's guide is a good start for this. Good luck, and tread carefully :) Bryan Tonnet batonnet@zeta.org.au