This discussion is archived
3 Replies Latest reply: Sep 3, 2012 8:56 AM by ChrisJenkins RSS

can I clear logfile ?

user6258915 Newbie
Currently Being Moderated
In Timesten11g, I encoutered the following :

Command> truncate table TEST1;
778: Log write failed because filesystem is full
The command failed.


I know the disk is full :
[root@host1 ~]# df -k /timesten/
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 15304712 14515360 0 100% /



I only set path of DataStore, and not set LogDir in my DSN as following:
[ana_tt1122]
Driver=/timesten/TimesTen/tt1122/lib/libtten.so
DataStore=/timesten/TimesTen/tt1122/info/ana/ana
DatabaseCharacterSet=ZHS16GBK
ConnectionCharacterSet=ZHS16GBK

And my question is :1, How to find where the logfiles are ? 2, And how to clear them , can I remove them?
3, In using TT, I want to generate least amount of log size in logfile, can I do it ?
  • 1. Re: can I clear logfile ?
    Gennady Sigalaev Journeyer
    Currently Being Moderated
    Hi user6258915,
    1. How to find where the logfiles are ?
    If you didn't set the Logdir DSN parameter, the logs file will be placed in DataStore=/timesten/TimesTen/tt1122/info/ana/ana
    2. And how to clear them , can I remove them?
    I don't think that it is possible, because you can corrupt the DB and lost some transactions. Don't do that (see the 3 answer).
    3. In using TT, I want to generate least amount of log size in logfile, can I do it ?
    You can specify different log files attributes:
    1. You can set the LogFileSize in 8 MB instead of 64MG (default value).
    2. Set LogPurge=1, in this case TimesTen automatically removes transaction log files when they have been written to both checkpoint files and there are no transactions that still need the transaction log files' contents.

    I hope this help.

    Regards,
    Gena
  • 2. Re: can I clear logfile ?
    user6258915 Newbie
    Currently Being Moderated
    Thanks very , you're so kind.
  • 3. Re: can I clear logfile ?
    ChrisJenkins Guru
    Currently Being Moderated
    Your problem here is that you basically don't have enough space allocated in the file system. Once you run out of space like this it is tricky to recover cleanly. As Gennady daid, you should never remove log files manually as you will almost certainly end up with an unusable database. The solution is to avoid this situation by (a) having adequate space in the file system and (b) making sure you are checkpointing often enough to clear the log files. Note that if you are using replication, AWT cacheing or XLA then these can also affect log purging. Note that LogPurge=1 is the default setting so based on your posted DSN settings you are already running with that set.

    Chris

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points