the "other" developer

Michel Schildmeijer

When thinking of development, one easily think of developing functionality for applications, business functionality and end-users.

But how about developing for administrators?

Normally a product like Oracle Application Server or Oracle WebLogic delivers some tools out of the box which a less experienced Admin can do it’s work.

As for me, I am most of the times not satisfied what is available, or think of a way to do it better and so I developed in the last year a lot of  small scripts and tools to make an Administrators life easier. Sometimes building on already existing concepts, sometimes something totally different.

I will post some of these solutions I created, in the the coming posts on this blog.

The first I like to share is one is made for Oracle AS 10.1.3 and based on opmn.

Its stop/start bundled in one.

#!/bin/sh
# By Michel Schildmeijer
# For auto start Oracle AS single node
export ORACLE_HOME=<PATH TO YOUR ORACLE AS INSTALLATION>
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
HOST1=`hostname`
case “$1” in
‘startopmn’)
echo “Start only opmn”
$ORACLE_HOME/opmn/bin/opmnctl start
$ORACLE_HOME/opmn/bin/opmnctl  status
;;
‘startall’)
echo “Start opmn….”
$ORACLE_HOME/opmn/bin/opmnctl start
echo “Start  HTTP Server”
$ORACLE_HOME/opmn/bin/opmnctl startproc process-type=HTTP_Server
$ORACLE_HOME/opmn/bin/opmnctl  status | grep HTTP
echo “”
echo “Start home container”
$ORACLE_HOME/opmn/bin/opmnctl  startproc process-type=home
$ORACLE_HOME/opmn/bin/opmnctl  status | grep home
echo “”
echo “Start SOA container ( BPEL/ESB/AIA)”
$ORACLE_HOME/opmn/bin/opmnctl  startproc process-type=oc4j_soa
$ORACLE_HOME/opmn/bin/opmnctl  status | grep oc4j_soa
## Check if components are started
$ORACLE_HOME/opmn/bin/opmnctl status -l |grep Alive > /tmp/check
if [ `wc -l /tmp/check | awk ‘{print $1}’` -gt 0 ]
then
echo “SOA/AIA Suite on $AS_INST Opmn started OK!”
else echo “$DATE – SOA/AIA Suite on $AS_INST is not started correctly”
fi
;;
‘stopall’)
echo “Stop SOA container ( BPEL/ESB/AIA)”
$ORACLE_HOME/opmn/bin/opmnctl  stopproc process-type=oc4j_soa
$ORACLE_HOME/opmn/bin/opmnctl  status | grep oc4j_soa
echo “”
echo “Stop home container”
$ORACLE_HOME/opmn/bin/opmnctl  stopproc process-type=home
$ORACLE_HOME/opmn/bin/opmnctl  status | grep home
echo “”
echo “Stop HTTP Server”
$ORACLE_HOME/opmn/bin/opmnctl  stopproc process-type=HTTP_Server
$ORACLE_HOME/opmn/bin/opmnctl  status | grep HTTP
echo “”
## Check if components are down
$ORACLE_HOME/opmn/bin/opmnctl status -l |grep Down > /tmp/check
if [ `wc -l /tmp/check | awk ‘{print $1}’` -gt 0 ]
then
echo “$AS_INST Opmn stop OK!”
else echo “$DATE – SOA/AIA Suite on $AS_INST is not stopped correctly”
fi
## shutdown opmn ##
$ORACLE_HOME/opmn/bin/opmnctl shutdown
## Check if opmn processes are down
ps -ef | grep opmn >/tmp/check
if [ `wc -l /tmp/check | awk ‘{print $1}’` -gt 0 ]
then
echo “$SOA/AIA Suite on AS_INST Opmn shutdown not  OK!”
else echo “$DATE – SOA/AIA Suite on $AS_INST is stopped correctly”
fi
;;
## Opmn shutdown with force
‘shutdown’)
echo “shutdown opmn with force”
$ORACLE_HOME/opmn/bin/opmnctl shutdown
## Check if opmn processes are down
ps -ef | grep opmn >/tmp/check
if [ `wc -l /tmp/check | awk ‘{print $1}’` -gt 0 ]
then
echo “$SOA/AIA Suite on AS_INST Opmn shutdown not  OK!”
else echo “$DATE – SOA/AIA Suite on $AS_INST is stopped correctly”
fi
;;
*)
echo “Usage: $0 {startopmn|startall|stopall|shutdown}”
exit 1
esac
exit 0


Next Post

ESB Control shows "Designtime cache has not been initialized"

Facebook0TwitterLinkedinAfter installing Oracle SOA Suite 10g (10.1.3.3) and logging on to the ESB Control, the following error appears: Designtime cache has not been initialized Please look in logs for following signs of failure. Fix them and restart. Possible causes are various, but here are the most important ones: (a) Database […]