Re: How to start OnLine ?
Posted in 1996
>From: Francois-Xavier Peretmere <fx@terra.fr>
>Date: Sun, 01 Sep 1996 22:18:23 +0200
>X-Informix-List-Id: <news.27648>
>
>How can I start Informix OnLine 7.11 from the command line to
>add the startup in my /etc/rc scripts ?
>
>Until now, I log on as the "informix" user, start tbmonitor,
>go to "Mode", go to "On-Line", and then exit from tbmonitor.
>>From the process point of view, it starts 11 "onitit -s".
Create a script that will be run by the /etc/rc processes.
This script will rather carefully set the Informix environment:
export INFORMIXDIR=/some/informix/directory
export PATH=$INFORMIXDIR/bin:$PATH
export ONCONFIG=onconfig.file.name
export INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhosts
export INFORMIXSERVER=servernameecho "Starting Informix-OnLine server $INFORMIXSERVER...\\c"
oninitecho "OK"
Obviously, you can revise the echoed messahe to suit your requirements.
If there is more than one server to start, then you should probably
create separate files for each server, setting the equivalent information
in each -- the ONCONFIG name and INFORMIXSERVER name will vary. Whether
INFORMIXSQLHOSTS varies from configuration to configuration or not is
largely a matter for the system administrators to decide, but a single
central file is usually sensible.
You probably don't need all these variable set, but with these set,
any shell scripts run by SYSTEM commands in SPL (and things like alarm
programs too) have some chance of havin a working Informix environment.
Add the necessary hooks into the rc processes to call the Informix startup
scripts. The details vary enormously from system to system, but on Solaris
2.4 and other SVR4 based machines, you'd probably create the scripts in
/etc/init.d, call it 'informix-online', and you'd create a link to it in
/etc/rc3.d such as /etc/rc3.d/S75informix.
Your code should emulate other startup scripts, so it should probably take
'start' and 'stop' arguments, and do the oninit in the 'start' code, and
run 'onmode -ky' in the 'stop' code.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>