Wednesday, August 3, 2011

Oracle OPMN Startup Script

Doing some OIM work and I have a few components that rely on OPMN managed processes to start such as OID, OVD, and OHS. While the processes themselves can be managed from OPMN to start the individual services, a dependency on the EMAgent to be online for this remote control capability exists. So, we have a chicken and egg issue, we need to start a OPMN process in order to remotely manage OPMN processes.

I developed this script to run on redhat boxes to automatically start/stop OPMN processes within the init process. Please note, it starts all processes and you must modify some of the environment variables before you use it yourself. Otherwise, enjoy!

# Startup script for all opmn components


case "$1" in
#Start all opmn components
su - $ORA_OWNER -c "$ORA_INSTANCE/bin/opmnctl startall"
#stop all opmn components
su - $ORA_OWNER -c "$ORA_INSTANCE/bin/opmnctl stopall"
#stop then start
su - $ORA_OWNER -c "$ORA_INSTANCE/bin/opmnctl stopall"
su - $ORA_OWNER -c "$ORA_INSTANCE/bin/opmnctl startall"
exit $RETVAL


  1. Thanks for this, it saved me some time writing one from scratch. One question, what is the purpose of the ORA_BASE variable, it seems not to be used

  2. ORA_INSTANCE should be $ORA_BASE/admin/oid_inst1, but for whatever reason I automatically expand my variable references while typing.

    Glad it could be helpful :)

  3. dafabet | - Legalbet
    Dafabet is the #1 다파벳 sportsbook in ทางเข้า m88 the world providing the latest and best odds on all sports. The only name 1xbet in the business.