Re: Transaction logging without BEGIN WORK's
Posted in 1998
H wrote: > > On Fri, 28 Aug 1998 14:45:18 -0700 (PDT), Jonathan Leffler > <jleffler@informix.com> wrote: > >On Fri, 28 Aug 1998, H wrote: > >> Is what he saying is this - that be having a transaction log with > >> coding the 4GL's with BEGIN WORK's etc then EVERYTHING is logged and > >> that your only option after a crash is to ROLLFORWARD everything?? > > > >I don't understand this question. > I'm not sure I do either and I asked it :-)))) > Er, let me try and think about this again. I think the question I was > trying to pose was this: that if the database is started with a > transaction log but the programs are not coded with BEGIN WORK's etc > then in the event of the computer crashing then the only option is to > ROLLFORWARD every transaction? > You mention the need for a good recovery plan Jonathan. Given our > current circumstances, what plan do you think we should have in place. > I would like to implement a quick and easy solution that is more > resilient than we have until I have recoded the programs to include > BEGIN WORK's etc. If the database has logging then, as Jonathan pointed out, each individual SQL statement is treated as a singleton transaction and is committed or rolled back based on its success or failure. On a crash any transactions begun since the last checkpoint would be rerun and rolled forward. If you do not have logging then there is no transaction and there can be no rollforward after a crash. Anything not flushed to disk since the last checkpoint will be lost and that can include index node pages which will leave an index in a useless or partially usable state. Art S. Kagel