how to autostart INFORMIX in UNIX using rc.local
Posted in 1994
> > Does anyone know the command to start informix automatically in the > /etc/rc.local? > > I have tried tbinit and tbmode but to no avail. > > Your immediate assistance is appreciated and thanked for in advance! > Check your PATH and TBCONFIG vars. # our start engine script: as always caveat emptor. # format of $ENGINE_FILE is: #DBSERVERNAME:config_file:server_no:tbtape-c?:arch_level:grps:sqlexec:profile:sq lexecd?:no_of_tapes:starname:starlog Format is: Servername (DBSERVERNAME from $TBCONFIG) $TBCONFIG (without the $INFORMIXDIR/etc please) Server Number (SERVERNUM from $TBCONFIG) tbtape -c? (y|n) should a tbtape -c be running for this engine? arch_level 7 digit number, 1 digit/weekday indicating archive level to perform on that day grps an abbreviation of the group names which have access to this engine (eg: 'ab' for groups ab_user, ab_dev, abmfg...) useful for scripts which set $DBPATH or $TBCONFIG see set_eng. sqlexec (sqlturbo|sqlexec) profile Don't know, probably the name of a profile to use for this engine. sqlexecd (y|n) should an IStar deamon be running for this engine? no_of_tapes 7 digit number again, how many tapes does this level of archive take? starname the name of the star server (from sqlhosts and /etc/services) starlog the name of the IStar logfile eg: server1:tbconfig.srvr1:1:y:0122122:ab:sqlexec::sqlturbo:3211211:star27:star27.log engines=`grep -v "^#" $ENGINE_FILE | cut -d":" -f 1` for engine in $engines do star_run=`grep $engine $ENGINE_FILE | cut -d":" -f9` if [ $star_run = "y" ] then #get TBCONFIG from the $ENGINE_FILE TBCONFIG=`grep $engine $ENGINE_FILE | cut -d":" -f 2` export TBCONFIG starname=`grep $engine $ENGINE_FILE | cut -d":" -f 11` starlog=`grep $engine $ENGINE_FILE | cut -d":" -f 12` $INFORMIXDIR/bin/tbinit $INFORMIXDIR/lib/sqlexecd $starname -l $INFORMIXDIR/$starlog sleep 5 found=`ps -ef | grep $starname` if [ -z "$found" ] then echo " $SYSTEM WAS REBOOTED AND -- $starname did not start correctly - pleas check" | mail informix@hpbs2651 echo " $SYSTEM WAS REBOOTED AND -- $starname did not start correctly - pleas check" sleep echo continuing with other engines...... sleep 1 fi else TBCONFIG=`grep $engine $ENGINE_FILE | cut -d":" -f 2` export TBCONFIG $INFORMIXDIR/bin/tbinit fi done cheers j. _____________________________________________________________________________ Jack Parker | Hewlett Packard, BSMC Boise, Idaho, USA| BEER jparker@hpbs3645.boi.hp.com | It's not just for breakfast anymore. _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________