'Start BI Services'
This simple, easy to use process for starting & stopping Weblogic & OBIEE 11g in Windows is something many developers take for granted. In personal development and proof of concept environments a Windows environment will suffice, but once we start talking about enterprise testing & production environments we quickly realize that a windows based Weblogic and OBIEE 11g environment just won't work.
We then start down the path of deployment on a Redhat or Solaris environment. After reading
Oracle's official guide on starting and stopping OBIEE 11g, we quickly realize just how lucky we were. No longer do we have the option of executing a single file to start and shut down Weblogic and OBIEE, at least not out of the box.
This request is commonly echoed on
Oracle Technical Network so today we'll outline how to create a
single file that acts as both a start up and shutdown script.
First, let's go over the manual
start up process for Weblogic & OBIEE 11g in Solaris & Linux:
- Start Administration Server
- located in your Weblogic Server Domain user_projects folder
- /user_projects/domains/bifoundation/bin/startWebLogic.sh
- example: ./startWebLogic.sh
- Start Node Manager
- located in your Weblogic Server Home Directory
- /wlserver_10.3/server/bin/startNodeManager.sh
- example: ./startNodeManager.sh
- Start Managed Server
- located in your Weblogic Server Domain user_projects folder
- /user_projects/domains/bifoundation/bin/startManagedWebLogic.sh
- example: ./startManagedWebLogic.sh bi_server1 t3://HOSTNAME:7001
- Start BI Services using Oracle Process Manager and Notification Server (opmnctl)
- located in your Orcle Instance folder
- /instances/instance1/bin/opmnctl
- example: opmnctl startall
Second, let's go over the manual
shut down process of Weblogic & OBIEE 11g in Solaris & Linux:
- Stop BI Services using Oracle Process Manager and Notification Server (opmnctl)
- located in your Orcle Instance folder
- /instances/instance1/bin/opmnctl
- example: opmnctl stopall
- Stop Managed Server
- located in your Weblogic Server Domain user_projects folder
- /user_projects/domains/bifoundation/bin/stopManagedWebLogic.sh
- example: ./stopManagedWebLogic.sh bi_server1 t3://HOSTNAME:7001
- Stop Node Manager
- There is no 'stopNodeManager', must kill associated proccesses
- example: pkill -TERM -u USERNAME -f "/startNodeManager.sh"
- example: pkill -TERM -u USERNAME -f "/java"
- Stop Admin Server
- located in your Weblogic Server Domain user_projects folder
- /user_projects/domains/bifoundation/bin/stopWebLogic.sh
- example: ./stopWebLogic.sh
So how do we automate this process?
By customizing the shell script below, you'll be able to automate the start up and shutdown sequence in OBIEE 11g.
The lines highlighted in
red require customization.
#!/bin/bash
#
# File: obiee.sh
# Purpose: Start and stop Oracle Business Intelligence 11g components.
#
# description: Start up and shutdown sequence for OBIEE 11g and Weblogic
#
# These values must be adapted to your environment.
ORACLE_OWNR=username # Local Unix user running OBIEE
ORACLE_FMW=/export/obiee/11g # Deployment root directory
BIEE_USER=weblogic # BIEE administrator name
BIEE_PASSWD=weblogic # BIEE administrator password
BIEE_DOMAIN=bifoundation_domain # Domain name
BIEE_INSTANCE=instance1 # Instance name
BIEE_SERVER=bi_server1 # Server name
BIEE_MANAGER_URL=hostname:7001 # Admin server URL (hostname:port)
WL_PATH=/export/obiee/11g/wlserver_10.3/server/bin
BIEE_PATH=/export/obiee/11g/user_projects/domains/bifoundation_domain/bin
ORACLE_INSTANCE=/export/obiee/11g/instances/instance1
export ORACLE_INSTANCE
START_LOG=/export/obiee/11g/obiee_startup_log/obiee-start.log
STOP_LOG=/export/obiee/11g/obiee_startup_log/obiee-stop.log
# SUBSYS=obiee
start() {
echo "********************************************************************************"
echo "Starting Admin Server on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/startWebLogic.sh" &
wait_for "Server started in RUNNING mode"
echo "********************************************************************************"
echo "Starting Node Manager on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$WL_PATH/startNodeManager.sh" &
wait_for "socket listener started on port"
echo "********************************************************************************"
echo "Starting Managed Server $BIEE_SERVER on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/startManagedWebLogic.sh $BIEE_SERVER t3://$BIEE_MANAGER_URL" &
wait_for "Server started in RUNNING mode"
echo "********************************************************************************"
echo "Starting BI components on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl startall"
echo "********************************************************************************"
echo "OBIEE start sequence completed on $(date)"
echo "********************************************************************************"
}
stop() {
echo "********************************************************************************"
echo "Stopping BI components on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl stopall"
echo "********************************************************************************"
echo "Stopping Managed Server $BIEE_SERVER on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/stopManagedWebLogic.sh $BIEE_SERVER t3://$BIEE_MANAGER_URL $BIEE_USER $BIEE_PASSWD"
echo "********************************************************************************"
echo "Stopping Node Manager on $(date)"
echo "********************************************************************************"
# pkill -TERM -u $ORACLE_OWNR -f "weblogic\\.NodeManager"
pkill -TERM -u $ORACLE_OWNR -f "/bin/sh/export/obiee/11g/wlserver_10.3/server/bin/startNodeManager.sh"
pkill -TERM -u $ORACLE_OWNR -f "/export/obiee/11g/Oracle_BI1/jdk/bin/sparcv9/java" echo "********************************************************************************"
echo "Stopping Admin Server on $(date)"
echo "********************************************************************************"
su $ORACLE_OWNR -c "$BIEE_PATH/stopWebLogic.sh"
echo "********************************************************************************"
echo "OBIEE stop sequence completed on $(date)"
echo "********************************************************************************"
}
wait_for() {
res=0
while [[ ! $res -gt 0 ]]
do
res=$(tail -5 "$START_LOG" | fgrep -c "$1")
sleep 5
done
}
case "$1" in
start)
echo "********************************************************************************"
echo "Starting Oracle Business Intelligence on $(date)"
echo "Logs are sent to $START_LOG"
echo "********************************************************************************"
start &> $START_LOG
# touch /var/lock/subsys/$SUBSYS
;;
stop)
echo
"********************************************************************************"
echo "Stopping Oracle Business Intelligence on $(date)"
echo "Logs are sent to $STOP_LOG"
echo "********************************************************************************"
stop &> $STOP_LOG
# rm -f /var/lock/subsys/$SUBSYS
;;
status)
echo "********************************************************************************"
echo "Oracle BIEE components status...."
echo "********************************************************************************"
su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl status"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $(basename $0) start|stop|restart|status"
exit 1
esac
exit 0
You must add your admin credentials to the following files:
- /user_projects/domains/bifoundation_domain/bin/startManagedWebLogic.sh
- /user_projects/domains/bifoundation_domain/servers/AdminServer/security/boot.properties
Start the script as follows:
The script will generate the following message after completion:
You can validate all services are running by logging into Fusion Middleware and Weblogic to check AdminServer, ManagedServer, and BI Services:
AdminServer & ManagedServer
BI Services
Stop OBIEE 11g and Weblogic by running the following command:
The script will generate the following message after completion:
You can validate that AdminServer, ManagedServer and BI Services are all shutdown by running ps -ef | grep obiee in your terminal. No weblogic & OBIEE processes should be active:
Note: if you are editing your shell script in a windows environment then uploading it to a Solaris/Linux environment via FTP, you will encounter whitespace issues when attempting to execute. This can be fixed by running the following command on the file:
perl -i -pe's/\r$//;' <file name here>
keywords: obiee start up script, obiee shut down script, obiee 11g installation, obiee admin