Re: Turn Transactions on?
Posted in 1996
Darin Strait wrote:
>
> The situation:
> I'm on a short-term job at a site where there is no Informix guru. I'm
> an Oracle guy modifying lots of someone else's Informix 4GL code. I have
.
.
.
> The questions:
> Why would I not want to turn on the transaction log? (I assume that this
> option was not exercised for some good reason and isn't the result of
> someone forgetting about it.)
>
> If I was going to turn on the transaction log, how would I go about
> doing it?
>
> With Informix SE, if transactions are implemented on a per-database
> level, how can I find out if each (or any) of the three databases have
> transactions turned on, besides writing a program that starts some
> simple-minded transaction?
>
> TIA
> -darin!
> --
> Darin Strait
The question about why the transaction log was not already turned on is
a good one. Most production databases that I've seen and worked on have
used the transaction log. The only reasons I could come up with about
why it was not turned on are 1) disk space considerations and 2) the
nature of the database may not call for explicit transactions to be
used. Of these two reasons, it is hard to come up with a well written
application which should not use transactions. The space consideration
has to do with the standard engine not purging the transaction log
automatically. If the log is left unmonitored in a relatively active
database environment, it can easily fill up available disk space (the
largest I have seen thus far was approx 970 MGs!).
To start transactions, all you have to do is to go into isql or
dbaccess. When prompted for a database name, press <DEL> (or your local
interrupt key) - both dbaccess and isql will then take you into the
query language without a database being selected (you can also use the
close database statement if the database is already selected). The SQL
statement to turn on the transaction log in the standard engine is
simply "start database <databasename> with log in "<full pathname of
logfile>".
The next time you come into the database, transactions are available. Be
aware that you should check the size of the logfile frequently and reset
it's size to zero bytes as appropriate (unix: cp /dev/null logfile).
Anyway, good luck,
Bill Bounds
VP
Echo Management Group
billb@qadas.com