Re: Need Info on tbtape/tbstat
Posted in 1992
>From: uunet!.adaclabs.com!mikep (Mike Pechner) >Subject: Need Info on tbtape/tbstat >Date: Tue, 24 Nov 1992 06:16:23 GMT >X-Informix-List-Id: <news.2186> > >I need to write a program to automatically know what level of >archive needs to be done. What level of archive needs to be done depends on your archiving strategy. Some people do a level 0 archive every day, and don't bother with level 1 and 2 archives ever. Other people do a level 0 archive once a week, followed by level 2, level 2, level 1, level 2, level 1, level 2. Other people do archives part way through the day. What I am saying is that the OnLine system does not determine what level of archive you need to do -- your archive strategy defines what is needed. >I am trying to read the ${INFORMIXDIR}/turbo.log to see the messages >indicating when the last archive completed. Is there somewhere else I >should be looking? The turbo.log and the tbmonitor status/archive does >not really match. I would rather use system log information if it exists, >rather than maintain my own. If turbo.log is where I look, what are the >relevant log messages I should be parsing and interpreting. As suggested earlier, you should look in your schedule definition for the next archive which is due. You can find out what was the last completed archive by grepping (or, more probably, using awk or perl) for the archive started, completed and cancelled messages. Having looked at your log file, I don't understand where the two stray level 0 archive messages came from -- but since they are both preceded by archive completed messages, you can ignore them. This requires the sort of intelligence available in awk/perl. The system does not contain information about your schedule. >If I am doing an archive once a day, do I need to backup the >logs? If there is a system crash, will the logs be needed? 2 Questions: (1) Do you want to be able to recover the work done during the day -- that is, the work done after the archive? If the answer is no, then the answer to your question is no, and you don't have to worry about the next question. (2) Are your logs big enough to hold all the work done during the day? If the answer to this question is yes (they are big enough), then the answer to your question is no (you don't have to back the logs up because all the information needed to recover the database is in the logs anyway). If you don't have enough log space and you do need to recover your latest transactions, then you should back up your logical logs. >Once I do an archive, are the logs sync'd? The answer is yes, but what did you really mean by this? After the archive is complete, the database knows where it got to in the logical logs and such like, and the information is recorded properly so that the system is self-consistent. Since a checkpoint occurs before the archive starts, the logs on disk are guaranteed to be in sync with the logs in memory before the archive starts. Other checkpoints can occur during the archive process, of course. >If I am doing the daily archives, can I backup the logs to /dev/null >to free them up. Yes, providing you don't want to use the logs during recovery. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>