Re: Pls. Help with Informix-SE v5 turning off trans. log.
Posted in 1998
On Mon, 5 Jan 1998, Zoltan Luspai wrote:
> Please help, I have problem with turning off (removing) the
> transaction log from an INFORMIX-SE ver 5.05.UC1. I have tried the sql
> command: START DATABASE <dbname> WITH NO LOG, but the dbaccess only
> gives me a 201: syntax error message.
Well, that syntax was not introduced until later that version 5, I think.
If that is the case, then you have to fall back on the old method,
summarised below.
David -- this is a contender for the FAQ (once someone has researched when
the WITH NO LOG option was first available):
It is easy to add a transaction log to an unlogged SE database using
the START DATABASE command and the WITH LOG IN "/file/name" and MODE
ANSI options.
In new versions of SE, it is possible to stop logging of a database
which is not MODE ANSI by using START DATABASE database WITH NO LOG
(trying to drop the log on a MODE ANSI database yields error -723).
In older versions of SE, there was no official way to stop the logging
of a database. Even in current systems, there is no supported way to
convert a MODE ANSI database into an unlogged database. However, a
suitably privileged user could do it by:
1. DATABASE dbase;
2. SELECT * FROM 'informix'.SysTables WHERE TabType = 'L';
3. DELETE FROM 'informix'.SysTables WHERE TabType = 'L';
4. DELETE FROM 'informix'.SysTables WHERE TabName = 'ANSI';
Step 2 tells you where the log file is; you will need to remove it.
Step 3 removes the record of where the log is kept. Step 4 removes the
MODE ANSI status from the database (and does nothing if the database
was not MODE ANSI). This is not supported by Informix; it will work,
though.
A suitably privileged user means someone logged in as informix. At
least on 7.24.UC1, being the database creator was insufficient
privilege.
Wishing you a Happy New Year...
Yours,
Jonathan Leffler (johnl@informix.com) #include <witticism.h>