Start and Stop IDS with Solaris rc* scripts
Posted in 2000
Topics: Server Administration, Platform-Specific Issues
Hello,
This time I'm having problems with the start up and shutdown of the IDS
engine. Actually I manually start and stop the IDS using the "oninit" and
"onmode -k" commands from the terminal with the user "informix".
But I want to do this automatically: do I need to edit the /etc/rc3,
/etc/rc5 and /etc/rc6 files from my Solaris OS ??? And what can I do to do
this as the "informix" user (he's the only one who can start and stop the
engine) ???
Thanks in advance !!!!
Alejandro Cabrera Obed
http://www.sisdis.gov.ar
E-mail: sisdis@tournet.com.ar
Bs. As. - Argentina
"Sistema Unico (CNA)" wrote:
> This time I'm having problems with the start up and shutdown of the IDS
> engine. Actually I manually start and stop the IDS using the "oninit" and
> "onmode -k" commands from the terminal with the user "informix".
> But I want to do this automatically: do I need to edit the /etc/rc3,
> /etc/rc5 and /etc/rc6 files from my Solaris OS ??? And what can I do to do
> this as the "informix" user (he's the only one who can start and stop the
> engine) ???
As Mark Stock suggested, place a file such as ius.rc (see below) in
/etc/init.d.
Then create links such as /etc/rc3.d/S95ius to /etc/init.d/ius.rc.
Don't forget
to keep a backup of the scripts somewhere outside the /etc directory;
upgrades to
the o/s are likely to lose your previous editions.
Sxx names are executed at startup in ascending order of the number.
Kxx names are executed at close down in descending order of the number.
The only residual issues are ensuring that you close down properly.
However,
fast recovery of IUS/IDS is usually just that, unless your checkpoint
interval
is disproportionately (sp?) long. Try not to take the system down when
the
DBMS is busy, that's all.
--
Yours,
Jonathan Leffler (Jonathan.Leffler@Informix.com) #include <disclaimer.h>
Guardian of DBD::Informix v1.00.PC1 -- http://www.perl.com/CPAN
"I don't suffer from insanity; I enjoy every minute of it!"
: "@(#)$Id: ius.rc,v 1.2 1998/06/09 22:07:02 jleffler Exp $"
#
# Control script for Informix Dynamic Server Databases
#
# * Edit INFORMIXDIR, INFORMIXSERVER and ONCONFIG to match your system.
# * Install under /etc, possibly in /etc/init.d with links in
/etc/rcN.d,
# or possibly listing it in /etc/inittab.
PRODUCT="Informix-Universal Server"
INFORMIXDIR=/usr/informixexport INFORMIXDIR
PATH=$INFORMIXDIR/bin:$PATHexport PATH
INFORMIXSERVER=iusexport INFORMIXSERVER
INFORMIXSQLHOSTS=$INFORMIXDIR/etc/sqlhostsexport INFORMIXSQLHOSTS
ONCONFIG=onconfig.iusexport ONCONFIG
case "$1" in
start)
echo "Starting $PRODUCT ($INFORMIXSERVER)"
onstat -V
oninit || echo "*** FAILED TO START $INFORMIXSERVER ***"
;;
stop)
if onstat -p > /dev/null
then
echo "Stopping $PRODUCT ($INFORMIXSERVER)"
onmode -ky || echo "*** FAILED TO STOP $INFORMIXSERVER
***"
else
echo "$PRODUCT ($INFORMIXSERVER) not running"
fi
;;
*)
echo "Usage: $0 { start | stop }" 1>&2
exit 1
;;esac