oracle obiee cluster auto restart

原创 2015年11月18日 17:13:20

obiee太多组件了. 有nodemgr, weblogic, managedserver, coreapplications.一个个启动很麻烦. OPS也不懂这些.

注意:根据obiee managed server的实际情况在不同节点上设置是否需要启动adminserver.

#!/bin/bash
#
# File:    /etc/init.d/obiee
# Purpose: Start and stop Oracle Business Intelligence 11g components.
#
# chkconfig: 2345 99 10
# description: Manage OBIEE service.
#

# These values must be adapted to your environment.

ORACLE_OWNR=oracle                  # Local Unix user running OBIEE
ORACLE_FMW=/app/oracle/fmw       # Deployment root directory

BIEE_USER=weblogic                # BIEE administrator name
BIEE_PASSWD=abc    # BIEE administrator password
BIEE_DOMAIN=bifoundation_domain           # Domain name
BIEE_INSTANCE=instance2             # Instance name
BIEE_SERVER=bi_server2              # Server name
BIEE_MANAGER_URL=192.168.36.1:7001    # Admin server URL (hostname:port)

# These should require no change.

WL_PATH=$ORACLE_FMW/wlserver_10.3/server/bin
BIEE_PATH=$ORACLE_FMW/user_projects/domains/$BIEE_DOMAIN/bin
ORACLE_INSTANCE=$ORACLE_FMW/instances/$BIEE_INSTANCE

export ORACLE_INSTANCE

START_LOG=/home/oracle/obiee-start.log
STOP_LOG=/home/oracle/obiee-stop.log
SUBSYS=obiee

start() {
    echo "********************************************************************************"
    echo "Starting Admin Server on $(date)"
    echo "********************************************************************************"
    su $ORACLE_OWNR -c "$BIEE_PATH/startWebLogic.sh" &
    #su - oracle -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" &
    #$WL_PATH/startNodeManager.sh&
    wait_for "socket listener started on port"

    echo "********************************************************************************"


    echo "********************************************************************************"
    echo "Starting Managed Server $BIEE_SERVER on $(date)"
    echo "********************************************************************************"
    su - $ORACLE_OWNR -c "$BIEE_PATH/startManagedWebLogic.sh $BIEE_SERVER http://$BIEE_MANAGER_URL" &
    #$BIEE_PATH/startManagedWebLogic.sh $BIEE_SERVER http://$BIEE_MANAGER_URL $BIEE_USER $BIEE_PASSWD &
    wait_for "Server started in RUNNING mode"

    echo "********************************************************************************"
    echo "Starting BI components on $(date)"
    echo "********************************************************************************"
    su $ORACLE_OWNR -c "$ORACLE_INSTANCE/bin/opmnctl startall"
    #$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"
    #$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"
    #$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 -f "weblogic\\.NodeManager"

    echo "********************************************************************************"
    echo "Stopping Admin Server on $(date)"
    echo "********************************************************************************"
    su $ORACLE_OWNR -c "$BIEE_PATH/stopWebLogic.sh"
    #$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
[root@nbiwapp2 init.d]# vim obiee
[root@nbiwapp2 init.d]# chkconfig --add obiee
[root@nbiwapp2 init.d]# chkconfig obiee on
[root@nbiwapp2 init.d]#  ln -s /etc/init.d/obiee /etc/rc0.d/K01obiee
[root@nbiwapp2 init.d]#  ln -s /etc/init.d/obiee /etc/rc6.d/K01obiee
[root@nbiwapp2 init.d]# chkconfig --list|grep obiee
obiee           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@nbiwapp2 init.d]#
版权声明:本文为博主原创文章,未经博主允许不得转载。

Cluster configuration for OBIEE

Here I will detail the steps to configure a two node OBIEE cluster. Prerequisites: I have used “Ba...

Auto Restart application after Crash/Force Close in Android

In an Android application, we usually got the “Force Closed” error if we didn’t get the exceptions r...

基于oracle restart的单实例SRVCTL使用详解

srvctl语法: srvctl command object options command为动词,详细见下表     Command       Descript...

Oracle Business Intelligence Enterprise Edition (OBIEE) 11g安装

1,windows安装安装OBIEE 11G,欢迎界面 2,软件更新,路过 3,安装类型:简单安装 4,安装先决条件检查 5,选择安装位置 6,设置 weblogic用户...

OEL6.1下安装Oracle 11gR2 和 OBIEE 11g

  • 2013年08月19日 09:52
  • 166KB
  • 下载

How to Use Oracle Restart in Oracle 11gR2

Oracle Restart是数据库组件监控方法向单实例数据库中的延展,之前srvctl命令可以用来管理RAC数据库中的各个组件,安装了Oracle Restart之后,对于单实例数据库组件(包括数据...

Oracle_OBIEE_Tuning_Guide

  • 2012年04月11日 12:33
  • 149KB
  • 下载

oralce 11g new feature 之 oracle restart

Oracle Restart It is another component of Oracle Grid Infrastructure for a Standalone Serve...
  • wengtf
  • wengtf
  • 2014年04月02日 15:01
  • 904

ASM单实例由Oracle Restart引发的系列故障分析(Final Version)

今天重新打开上次安装完的一个ASM单实例环境,突然报错 SQL> startup ORA-01078: failure in processing system parameters ORA-0156...

oracle restart:语句重新执行

今天看了tom大师关于sql restart的博客,收益颇深。鉴于翻墙的繁琐和以后查阅的方便,将主要内容总结至此。大家也可以通过如下地址查看原博文及精彩点评(需要翻墙哦)。 http://tkyte...
  • joeadai
  • joeadai
  • 2013年11月13日 15:47
  • 1175
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:oracle obiee cluster auto restart
举报原因:
原因补充:

(最多只允许输入30个字)