Re: NOT IN TRANSACTION
Posted in 1999
> If you are the DBA (ie you can su informix), then from the command prompt,
> type:
>
> ontape -s -<LogLevelSwitch> <yourdatabasename>>
> where LogLevelSwitch can be U (for unbuffered logging), B
> (for buffered logging) or A (for ANSI style logging). With
> U all transactions are immediately flushed to disk on COMMIT,
> while with B transactions are cached until a checkpoint.
Buffered log records are also flushed to disk when the logical log buffer fills.
> With A, each SQL statement will be an implicit transaction,
> and you dont need BEGIN/COMMIT WORK, but it comes with its own
> set of quirks, so I would advise you to stick to either U or B.
Actually, ANSI logging does still require COMMIT WORK. It forces all updates to
be part of a transaction, so there is an implicit BEGIN WORK as soon as you try
to execute any INSERT/UPDATE/DELETE statement. Because of this implied BEGIN
WORK, your program must end a transaction with a COMMIT WORK or ROLLBACK WORK.
With buffered or unbuffered logging, any SQL statements that were not preceded
by a BEGIN WORK are implicit transactions. For further information, refer to
chapter 2 of "Informix Guide to SQL: Syntax", the entry for the COMMIT WORK
statement.
I agree with the recommendation to avoid ANSI logging if at all possible.
Mark Collins
mcollins@us.dhl.com
Dilbert is a documentary.