- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need informix /sbin/init.d/informix startup/sh...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2005 08:50 AM
тАО07-26-2005 08:50 AM
The current ~informix/.profile script includes prompts for whoever is logging onto the informix user account so doing a su - informix will not work. I want to leave the current ~informix/.profile alone.
I want to be sure that root can start the instance AND properly set the environment variables needed for starting/stopping the database. I figure I'll need to do 'su informix ...' commands but know they will fail if I do not have the correct environment variables and PATH's set prior to executing the commands.
Thanks in advance... Jack...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2005 08:59 AM
тАО07-26-2005 08:59 AM
Re: Need informix /sbin/init.d/informix startup/shutdown script
http://www.prstech.com/src/S900informix_hp.sh.txt
(linked from this page here : http://www.prstech.com/downloads.shtml)
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2005 09:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2005 09:19 AM
тАО07-26-2005 09:19 AM
Re: Need informix /sbin/init.d/informix startup/shutdown script
shell 1:
#file /etc/rc.config.d/dbstartdb ------------------------------------
export INFORMIXDIR=/informix
export INFORMIXSERVER=FOOBARk
export ONCONFIG=onconfig.FOOBAR
export IFMX_HPKAIO_NUM_REQ=5000
export KAIOON=1
# end file /etc/rc.config.d/dbstartdb
shell 2:
# file /sbin/rc3.d/S995dbstart -----------------------------------------
#!/bin/sh
set -x
#
# This script is to be used to startup and shutdown the Informix Server
# Optimized for HP/UX
#
# Installation instructions
#
# Copy this script to /sbin/init.d
# Link it to a start and a stop file in each of the rc?.d directory
# appropriate for the run level for which you wish the engine to be started, e
g:
#
# $ ln -s /sbin/init.d/informix /sbin/rc3.d/S900informix
# $ ln -s /sbin/init.d/informix /sbin/rc0.d/K500informix
#
################################################################################
####
#
# Note: You can set the Informix environment several ways.
# You can hardcode it here - or else you can set it using a file.
# If you hardcode it here, it would look something like this...
#export INFORMIXDIR=/informix
#export INFORMIXSERVER=myserver_shm
#export ONCONFIG=onconfig.myserver
# If you set it using a file, it might look like this...
#ENV_FILE=/usr/local/bin/set_informix_env.sh
#if [ -x $ENV_FILE ]
#then
# . $ENV_FILE
#else
# echo "Error: the file used to set the Informix environment does not exist!"
# echo "The filename is: $ENV_FILE"
# exit 1
#fi
ENV_FILE=/etc/rc.config.d/dbstartdb
if [ -x $ENV_FILE ]
then
. $ENV_FILE
else
echo "Error: the file used to set the Informix environment does not exist!"
echo "The filename is: $ENV_FILE"
exit 1
fi
#-------------------------------------------------------------------------------
------
if [ $# -lt 1 ]
then
echo "Usage: $0 {start|stop|start_msg|stop_msg}"
else
case "$1" in
"start_msg") echo "Starting up the Informix Online Server..." ;;
"stop_msg") echo "Shutting down the Informix Online Server..." ;;
"start")
if [ `$INFORMIXDIR/bin/onstat 2>&- | /usr/bin/grep -c "not initialized"` -n
e 0 ]
then
# If you wanted to rotate the online.log at start-up time
# this would be a good place to put it.
# /home/informix/bin/rotate_informix_logs.sh
echo "Starting up the Informix Online Engine... "
$INFORMIXDIR/bin/oninit
cnt=30 # Give informix 30 seconds to come online before giv
ing up
flag_online=false
while [ $cnt -gt 0 ]
do
if [ `$INFORMIXDIR/bin/onstat 2>&- | /usr/bin/grep -c "not initiali
zed"` -eq 0 ]
then
flag_online=true
break
fi
cnt=`expr $cnt - 1` # Decrement cnt
sleep 1
done
if [ $flag_online = true ]
then
$INFORMIXDIR/bin/onstat -
# If you wanted to start continuous logging to tape at start-up tim
e
# this would be a good place to put it.
# /home/informix/bin/start_logging.sh &
echo "done"
else
echo "Warning: the Informix Online Engine did NOT start successfull
y!"
fi
fi
;;
"stop")
if [ `$INFORMIXDIR/bin/onstat 2>&- | /usr/bin/grep -c "not initialized"` -e
q 0 ]
then
# If you wanted to stop continuous logging to tape at shutdown time
# this would be a good place to put it.
# /home/informix/bin/stop_logging.sh
echo "Shutting down the Informix Online Engine... "
$INFORMIXDIR/bin/onmode -ky
cnt=30 # Give informix 30 seconds to come offline before gi
ving up
flag_online=true
while [ $cnt -gt 0 ]
do
if [ `$INFORMIXDIR/bin/onstat 2>&- | /usr/bin/grep -c "not initiali
zed"` -ne 0 ]
then
flag_online=false
break
fi
cnt=`expr $cnt - 1` # Decrement cnt
sleep 1
done
if [ $flag_online = true ]
then
echo "Warning: the Informix Online Engine did NOT go offline succes
sfully!"
else
echo "done"
then
flag_online=false
break
fi
cnt=`expr $cnt - 1` # Decrement cnt
sleep 1
done
if [ $flag_online = true ]
then
echo "Warning: the Informix Online Engine did NOT go offline succes
sfully!"
else
echo "done"
fi
fi
;;
*)
echo "Usage: $0 {start|stop|start_msg|stop_msg}"
;;
esac
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-26-2005 07:06 PM
тАО07-26-2005 07:06 PM
Re: Need informix /sbin/init.d/informix startup/shutdown script
I'm no Informix admin,
but we have many Informix clusters running.
When I look at our init scripts I have to conclude that starting and stopping an Informix instance is astonishingly simple.
So you can easily create your own script from a copy of /sbin/init.d/template
All it requires is the setting of three environment variables, and issuing one on* command.
In your script export the following:
INFORMIXDIR
this must point to the root dir of your informix instance.
INFORMIXSERVER
this holds the name of your informix instance
ONINIT=onconfig # most of the times
this is the name of your instance's config file
With these set in the environment of the starting process simply run
$INFORMIXDIR/bin/oninit -v
to start your instance
$INFORMIXDIR/bin/onmode -ky
to shut down your instance
Whenever I needed to get my hands dirty with some (surface scratching) DBMS stuff I always admired the elegance and closeness to the UNIX philosophy of Informix.
You can run the most aggregated and involved query or admin tasks from the Unix shell like you are used to from Unix system administration.
I've never seen such with our Oracle DBMSs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-27-2005 12:12 AM
тАО07-27-2005 12:12 AM
Re: Need informix /sbin/init.d/informix startup/shutdown script
jack...