Transaction Log
Posted in 2000
Topics: Transactions, Locking & Isolation, Logging & Checkpoints
Hi, Please let me know how do I perform the following functions. 1. How to truncate the Transaction log when it filled up. 2. How do I truncate the log when single transaction fills up the whole log 3. Can I have a setup to truncate the log automatically whenever it fills up (like in sybase sp_dboption database,"truncate log on chkpt",true or sp_dboption databaes,"abort tran on log full",true what are the similar commands in Informix Any would be appreciated. thank you -suda Sent via Deja.com http://www.deja.com/ Before you buy.
Assuming you mean the logical logs: 1) NEVER let it fill up.... back them up when they get close. 2) truncation has no meaning. "kakkar" <sudhakark@hotmail.com> wrote in message news:8fuegd$bdu$1@nnrp1.deja.com... > Hi, > > Please let me know how do I perform the following functions. > > 1. How to truncate the Transaction log when it filled up. > 2. How do I truncate the log when single transaction fills up the whole > log > 3. Can I have a setup to truncate the log automatically whenever > it fills up (like in sybase sp_dboption database,"truncate log on > chkpt",true or > sp_dboption databaes,"abort tran on log full",true > > what are the similar commands in Informix > > Any would be appreciated. > > thank you > -suda > > > > > Sent via Deja.com http://www.deja.com/ > Before you buy.
kakkar wrote:
> Hi,
>
> Please let me know how do I perform the following functions.
>
> 1. How to truncate the Transaction log when it filled up.
If you are using the Online Engine, set your onconfig parameter LTAPEDEV
to "/dev/null" and restart your engine. This has the effect of simulating
a backup and freeing of the log file as it fills. (You may have to
simulate backing up of already filled logs by executing "ontape -a" at
the command line).
>
> 2. How do I truncate the log when single transaction fills up the whole
> log
Informix Online generally will not allow this to happen, generating an
error called a "long transaction". Also, read up on the configuration
parameters LTXHWM and LTXEHWM in the Admin Guide.
>
> 3. Can I have a setup to truncate the log automatically whenever
> it fills up (like in sybase sp_dboption database,"truncate log on
> chkpt",true or
> sp_dboption databaes,"abort tran on log full",true
Same as 1.
Rudy
On Wed, 17 May 2000 15:40:01 GMT, kakkar Wrote: > Hi, > > Please let me know how do I perform the following functions. > > 1. How to truncate the Transaction log when it filled up. > 2. How do I truncate the log when single transaction fills up the whole > log > 3. Can I have a setup to truncate the log automatically whenever > it fills up (like in sybase sp_dboption database,"truncate log on > chkpt",true or > sp_dboption databaes,"abort tran on log full",true > > what are the similar commands in Informix > What database engine are you using ? /J\\
kakkar wrote:
>
> Hi,
>
> Please let me know how do I perform the following functions.
>
> 1. How to truncate the Transaction log when it filled up.
> 2. How do I truncate the log when single transaction fills up the whole
> log
> 3. Can I have a setup to truncate the log automatically whenever
> it fills up (like in sybase sp_dboption database,"truncate log on
> chkpt",true or
> sp_dboption databaes,"abort tran on log full",true
>
> what are the similar commands in Informix
You have several options. The logical logfiles are freed after they are
backed up. You can use ontape -c to constantly back up each log file as
it fills but that option will tie up a window and a tape drive at all times.
You can use the ONCONFIG file parameter ALARMPROGRAM to specify a script or
program to execute when any of 24 system "events" occurs, event #23 is
"logical log completed" and your script/program would execute ontape -a
to back up any completed logical logs a disk file automatically without
tying up a window or tape drive then you can have a cron or the nightly
system backup sweep the log backup files to tape periodically or rcp them
to another system for safety. I have submitted a package for this option
called utils3_ak to the IIUG Software Repository. Lastly you can tell the
engine to discard the logical log files when completed by specifying
/dev/null as the value of the ONCONFIG parameter LTAPEDEV (if you do this
using an editor you will have to shutdown and restart the engine for it to
take effect but you can use onmonitor to make the change on the fly
instead).
All but the last are valid options on a production system and I would
combine the chosen option with increasing the number of logical logs to
prevent a single long transaction from filling the log files. Further
protection from this situation is provided by using LBU_PRESERVE set to
1 to save one whole logical log file for use in recovering from the
situation should it occur, and the LTXHWM and LTXEHWM parameters in
combination with more and larger logfiles and archiving to permit larger
transactions to complete while having enough free log space to record
rollback information for runaway processes. Trashing you logs using
/dev/null is NOT recommended except in a test environment. You will find
yourself awakened at 3AM some morning to rebuild damaged indexes after a
system crash and someday you will surely have a catastrophic system crash
5 minutes before the new archive would have completed and you boss will
want to know why a full days data was lost!
Art S. Kagel