Turning off transaction logging from command line? (fwd)
Posted in 1992
> I would like to know if there is a better way of doing this.
> Ideally, I would like to do the following from a shell script:
> 1. disable transaction logging
> 2. load all text files into Informix
> 3. enable transaction logging
> Then the shell script would be run from cron(1) every Saturday AM,
> saving the DBA the trouble of having to dial into our system every
> weekend.
If you're running Standard Engine, it's pretty simple. If you're
running OnLine, then I'm not so sure.
In SE, you can 'su' to informix and just delete the log file out of
systables with:
delete from systables where tabtype="L"
To turn it back on, you can just:
start database xyz with log in "/this/is/a/long/path"
Both of those SQL statement can be fed to ISQL, or put into a 4GL
program to be executed.
I think you can do similiar things with Online, but you have to play
games with the 'tbmode'. The other trick is archiving the database
before the log change. 'tbtape' is pretty famous for not running well
in a script.
Luck,
Will
(uunet!la4gen!villy)