automate startup script

crafuse

New Member
Folks -

I'm a Newbie...

Progress 10.1b on a AIX 5.3 box. I'd like to be able to create a cron job that checks if the database is down, and if it is, restarts it. Is this even advisable?

Background: Have a very stable environment that has crashed twice in the last 10 weeks. Seems to be due to the actions of a single user, cannot quite determine the cause - am thinking it's terminal emulator or print queue issues. Anyways, the database always starts nicely once it's brought back up.

Was thinking I could grep the output of ps -A for '_mprosrv', and if not found then perhaps proceed with a start-up.

Feel free to slam me if this is a totally irresponsible approach to restarting an db instance who's crash has not been properly investigated. But my thinking is that if it's in any kind of state that actually requires intervention\recovery, then it simple would not restart. Am I right?

Thanks,
crafuse
 

Casper

ProgressTalk.com Moderator
Staff member
Just a quick answer. I suspect more answers will folow.

I think it would make more sense to investigate what caused the crash of the database. If a Progress database crashes then something is wrong which needs to be inspected. The database crashes to insure no database corruption will occur and so likewise it will always start up after a (normal) crash.
IMO, You must look in the db log file to see what caused this abnormal shutdown. And then act on that information to make sure it doesn't happen again.

Casper.
 

crafuse

New Member
Thanks, Casper.

You're quite right, of course, in what you say. I personally wouldn't normally go down the road of re-starting without checking things out in greater detail, but I'm getting some pressure from non-IT higher-ups to come up with something.

In any case, could you do me a favor and tell me exactly what kind of log file I should be looking for? And where I might find it relative to the install (DLC) directory?

Is this simply a text based file that I can view using cat?

Thanks,
crafuse
 

Casper

ProgressTalk.com Moderator
Staff member
The log file is a text file whith the name <databasename>.lg.
The Database log files are placed in the directory where the
Database resides.

HTH,

Casper
 

syddie

New Member
I agree with Casper, the databases should not be crashing. Ours run day in day out and never crash. Perhaps some form of notification may be the answer. Create a cron job to monitor the database is up. If not it can alert you by email that the database is down. It could check every minute. You then be able to find out who and what was happening at the time if you can trap the intant the database went down. Also check operating system logs for clues as well.

Ken
 
Top