免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: 3c905_sh
打印 上一主题 下一主题

redhat 5.1 使用linux cluster 配置双机 oracle10G [复制链接]

论坛徽章:
0
11 [报告]
发表于 2008-05-23 23:00 |只看该作者
#!/bin/bash
. /etc/init.d/functions
# . /etc/sysconfig/oracledb
declare SCRIPT="`basename $0`"
declare SCRIPTDIR="`dirname $0`"
[ -n "$OCF_RESKEY_user" ] && ORACLE_USER=$OCF_RESKEY_user
[ -n "$OCF_RESKEY_home" ] && ORACLE_HOME=$OCF_RESKEY_home
[ -n "$OCF_RESKEY_name" ] && ORACLE_SID=$OCF_RESKEY_name
[ -n "$OCF_RESKEY_lockfile" ] && LOCKFILE=$OCF_RESKEY_lockfile
[ -n "$OCF_RESKEY_type" ] && ORACLE_TYPE=$OCF_RESKEY_type
[ -n "$OCF_RESKEY_vhost" ] && ORACLE_HOSTNAME=$OCF_RESKEY_vhost
#-----------------------------------------------------------------------------------------
# 1. Oracle user.  Must be the same across all cluster members.  In the event
#    that this script is run by the super-user, it will automatically switch
#    to the Oracle user and restart.  Oracle needs to run as the Oracle
#    user, not as root.
#
[ -n "$ORACLE_USER" ] || ORACLE_USER=oracle
#
# 2. Oracle home.  This is set up during the installation phase of Oracle.
#    From the perspective of the cluster, this is generally the mount point
#    you intend to use as the mount point for your Oracle Infrastructure
#    service.
#
[ -n "$ORACLE_HOME" ] || ORACLE_HOME=/u01/app/oracle/product/10.2.0
#
# 3. This is your SID.  This is set up during oracle installation as well.
#
[ -n "$ORACLE_SID" ] || ORACLE_SID=orac
#
# 4. The oracle user probably doesn't have the permission to write to
# /var/lock/subsys, so use the user's home directory.
#
[ -n "$LOCKFILE" ] || LOCKFILE="/home/$ORACLE_USER/.oracle-ias.lock"
#[ -n "$LOCKFILE" ] || LOCKFILE="$ORACLE_HOME/.oracle-ias.lock"
#[ -n "$LOCKFILE" ] || LOCKFILE="/var/lock/subsys/oracle-ias" # Watch privileges
#
# 5. Type of Oracle Database.  Currently supported: 10g 10g-iAS(untested!)
#
[ -n "$ORACLE_TYPE" ] || ORACLE_TYPE=10g
#
# 6. Oracle virtual hostname.  This is the hostname you gave Oracle during
#    installation.
#
[ -n "$ORACLE_HOSTNAME" ] || ORACLE_HOSTNAME=datebaseha

#-------------------------------------------------------------------------------------
ORACLE_TYPE=`echo $ORACLE_TYPE | tr A-Z a-z`
export ORACLE_USER ORACLE_HOME ORACLE_SID LOCKFILE ORACLE_TYPE
export ORACLE_HOSTNAME

#-----------------------------------------------------------------------------------
export LD_LIBRARY_PATH=$ORACLE_HOME/libORACLE_HOME/opmn/lib
export PATH=$ORACLE_HOME/binORACLE_HOME/opmn/binORACLE_HOME/dcm/binPATH
declare -i RESTART_RETRIES=3
declare -r DB_PROCNAMES="pmon"
declare -r LSNR_PROCNAME="tnslsnr"
declare -r LOCKFILE="/home/$ORACLE_USER/.oracle-ias.lock"
#--------------------------------------------------------#
# (Hopefully) No user-serviceable parts below this line. #
#--------------------------------------------------------#
meta_data()
{
cat <<EOT
<?xml version="1.0" ?>
<resource-agent name="oracledb" version="rgmanager 2.0">
    <version>1.0</version>
    <longdesc lang="en">
Oracle 10g Failover Instance
    </longdesc>
    <shortdesc lang="en">
Oracle 10g Failover Instance
    </shortdesc>
    <parameters>
        <parameter name="name" primary="1">
     <longdesc lang="en">
  Instance name (SID) of oracle instance
     </longdesc>
            <shortdesc lang="en">
  Oracle SID
            </shortdesc>
     <content type="string"/>
        </parameter>
        <parameter name="user" unique="1" required="1">
     <longdesc lang="en">
  Oracle user name.  This is the user name of the Oracle
  user which the Oracle AS instance runs as.
     </longdesc>
            <shortdesc lang="en">
  Oracle User Name
            </shortdesc>
     <content type="string"/>
        </parameter>
        <parameter name="home" unique="1" required="1">
     <longdesc lang="en">
  This is the Oracle (application, not user) home directory.
  This is configured when you install Oracle.
     </longdesc>
            <shortdesc lang="en">
  Oracle Home Directory
            </shortdesc>
     <content type="string"/>
        </parameter>
        <parameter name="type" required="1">
     <longdesc lang="en">
  This is the Oracle installation type.
  Only "10g" and "10g-ias" are supported, and 10g-ias is
  untested.
     </longdesc>
            <shortdesc lang="en">
  Oracle Installation Type
            </shortdesc>
     <content type="string"/>
        </parameter>
        <parameter name="vhost" required="0" unique="1">
     <longdesc lang="en">
         Virtual Hostname matching the installation hostname of
  Oracle 10g.  Note that during the start/stop of an oracledb
  resource, your hostname will temporarily be changed to
  this hostname.  As such, it is recommended that oracledb
  resources be instanced as part of an exclusive service only.
     </longdesc>
            <shortdesc lang="en">
  Virtual Hostname
            </shortdesc>
     <content type="string"/>
        </parameter>
    </parameters>
    <actions>
        <action name="start" timeout="900"/>
<action name="stop" timeout="90"/>
        <action name="recover" timeout="990"/>
<!-- Checks to see if it's mounted in the right place -->
<action name="status" timeout="10"/>
<action name="monitor" timeout="10"/>
<!-- Checks to see if we can read from the mountpoint -->
<action name="status" depth="10" timeout="30" interval="5m"/>
<action name="monitor" depth="10" timeout="30" interval="5m"/>
<!-- Checks to see if we can write to the mountpoint (if !ROFS) -->
<action name="status" depth="20" timeout="90" interval="10m"/>
<action name="monitor" depth="20" timeout="90" interval="10m"/>
<action name="meta-data" timeout="5"/>
<action name="verify-all" timeout="5"/>
    </actions>
    <special tag="rgmanager">
<attributes maxinstances="1"/>
    </special>
</resource-agent>
EOT
}

#
# "action"-like macro supporting functions
#
faction()
{
echo -n "$1"
shift
$*
if [ $? -eq 0 ]; then
  echo_success
  echo
  return 0
fi
echo_failure
echo
return 1
}

#
# Start Oracle9i (database portion)
#
start_db()
{
declare tmpfile
declare logfile
declare -i rv
tmpfile=/tmp/$SCRIPT-start.$$
logfile=/tmp/$SCRIPT-start.log
#
# Set up our sqlplus script.  Basically, we're trying to
# capture output in the hopes that it's useful in the case
# that something doesn't work properly.
#
echo "startup" > $tmpfile
echo "quit" >> $tmpfile
sqlplus "/ as sysdba" < $tmpfile &> $logfile
rv=$?
# Dump logfile to /var/log/messages
initlog -q -c "cat $logfile"

if [ $rv -ne 0 ]; then
  echo "ORACLE_HOME Incorrectly set?"
  echo "See $logfile for more information."
  return 1
fi
#
# If we see:
# ORA-.....: failure, we failed
#
rm -f $tmpfile
grep -q "failure" $logfile
if [ $? -eq 0 ]; then
  rm -f $tmpfile
  echo "ORACLE_SID Incorrectly set?"
  echo "See $logfile for more information."
  return 1
fi
return 0
}

#
# Stop Oracle9i (database portion)
#
stop_db()
{
declare tmpfile
declare logfile
declare -i rv
tmpfile=/tmp/$SCRIPT-stop.$$
logfile=/tmp/$SCRIPT-stop.log
# Setup for Stop ...
echo "shutdown abort" > $tmpfile
echo "quit" >> $tmpfile
sqlplus "/ as sysdba" < $tmpfile &> $logfile
rv=$?
# Dump logfile to /var/log/messages
initlog -q -c "cat $logfile"

if [ $rv -ne 0 ]; then
  echo "ORACLE_HOME Incorrectly set?"
  echo "See $logfile for more information."
  return 1
fi
#
# If we see 'failure' in the log, we're done.
#
rm -f $tmpfile
grep -q failure $logfile
if [ $? -eq 0 ]; then
  echo_failure
  echo
  echo "ossible reason: ORACLE_SID Incorrectly set."
  echo "See $logfile for more information."
  return 1
fi
return 0
}

论坛徽章:
0
12 [报告]
发表于 2008-05-23 23:04 |只看该作者
#
# Destroy any remaining processes with refs to $ORACLE_HOME
#
force_cleanup()
{
declare pids
declare pid
pids=`ps ax | grep $ORACLE_HOME | grep -v grep | awk '{print $1}'`
initlog -n $SCRIPT -s "<err> Not all Oracle processes exited cleanly, killing"

for pid in $pids; do
  kill -9 $pid
  if [ $? -eq 0 ]; then
   initlog -n $SCRIPT -s "Killed $pid"
  fi
done
return 0
}

#
# Wait for oracle processes to exit.  Time out after 60 seconds
#
exit_idle()
{
declare -i n=0
while ps ax | grep $ORACLE_HOME | grep -q -v grep; do
  if [ $n -ge 90 ]; then
   force_cleanup
   return 0
  fi
  sleep 1
  ((n++))
done
return 0
}

#
# Get database background process status.  Restart it if it failed and
# we have seen the lock file.
#
get_db_status()
{
declare -i subsys_lock=$1
declare -i i=0
declare -i rv=0
declare ora_procname
for procname in $DB_PROCNAMES ; do
  ora_procname="ora_${procname}_${ORACLE_SID}"
  
  status $ora_procname
  if [ $? -eq 0 ] ; then
   # This one's okay; go to the next one.
   continue
  fi
  #
  # We're not supposed to be running, and we are,
  # in fact, not running...
  # XXX only works when monitoring one db process; consider
  # extending in future.
  #
  if [ $subsys_lock -ne 0 ]; then
   return 3
  fi
  for (( i=$RESTART_RETRIES ; i; i-- )) ; do
   # this db process is down - stop and
   # (re)start all ora_XXXX_$ORACLE_SID processes
   initlog -q -n $SCRIPT -s "Restarting Oracle Database..."
   stop_db
   if [ $? != 0 ] ; then
    # stop failed - return 1
    return 1
   fi
   start_db
   if [ $? == 0 ] ; then
    # ora_XXXX_$ORACLE_SID processes started
    # successfully, so break out of the
    # stop/start # 'for' loop
    break
   fi
  done
  if [ $i -eq 0 ]; then
   # stop/start's failed - return 1 (failure)
   return 1
  fi
done
return 0
}
#
# Get the status of the Oracle listener process
#
get_lsnr_status()
{
        declare -i subsys_lock=$1
        declare -i rv

        status $LSNR_PROCNAME
        rv=$?
        if [ $rv == 0 ] ; then
                return 0 # Listener is running fine
        fi

        #
        # We're not supposed to be running, and we are,
        # in fact, not running.  Return 3
        #
        if [ $subsys_lock -ne 0 ]; then
                return 3
        fi

        #
        # Listener is NOT running (but should be) - try to restart
        #
        for (( i=$RESTART_RETRIES ; i; i-- )) ; do

                action "Restarting Oracle listener:" lsnrctl start
                lsnrctl status >& /dev/null
                if [ $? == 0 ] ; then
                        break # Listener was (re)started and is running fine
                fi
        done

        if [ $i -eq 0 ]; then
                # stop/start's failed - return 1 (failure)
                return 1
        fi

        status $LSNR_PROCNAME
        if [ $? != 0 ] ; then
                return 1 # Problem restarting the Listener
        fi
        return 0 # Success restarting the Listener
}


#
# usage: get_opmn_proc_status <ias-component> [process-type]
#
# Get the status of a specific OPMN-managed process.  If process-type
# is not specified, assume the process-type is the same as the ias-component.
# If the lock-file exists (or no lock file is specified), try to restart
# the given process-type if it is not running.
#
get_opmn_proc_status()
{
        declare comp=$1
        declare opmntype=$2
        declare type_pretty
        declare _pid _status
      
        [ -n "$comp" ] || return 1
        if [ -z "$opmntype" ]; then
                opmntype=$comp
        else
                type_pretty=" [$opmntype]"
        fi

        for (( i=$RESTART_RETRIES ; i; i-- )) ; do

                _status=`opmnctl status | grep "^$comp " | grep " $opmntype " | cut -d '|' -f3,4 | sed -e 's/ //g' -e 's/|/ /g'`

                _pid=`echo $_status | cut -f1 -d' '`
                _status=`echo $_status | cut -f2 -d' '`
                if [ "${_status}" == "Alive" ] || [ "${_status}" == "Init" ]; then
                        if [ $i -lt $RESTART_RETRIES ] ; then
                                echo "  $comp$type_pretty restarted"
                        fi
                        echo "  $comp$type_pretty (pid $_pid) is running..."
                        break
                else
                        echo "  $comp$type_pretty is stopped"

                        #
                        # Try to restart it, but don't worry if we fail.  OPMN
                        # is supposed to handle restarting these anyway.
                        #
                        # If it's running and you tell OPMN to "start" it,
                        # you will get an error.
                        #
                        # If it's NOT running and you tell OPMN to "restart"
                        # it, you will also get an error.
                        #
                        opmnctl startproc process-type=$opmntype &> /dev/null
                fi
        done

        if [ $i -eq 0 ]; then
                # restarts failed - return 1 (failure)
                return 1
        fi

        return 0
}


#
# Get the status of the OPMN-managed processes.
#
get_opmn_status()
{
        declare -i subsys_lock=$1
        declare -i ct_errors=0

        opmnctl status &> /dev/null
        if [ $? -eq 2 ]; then
                #
                # OPMN not running??
                #
                echo "opmn is stopped"

                if [ $subsys_lock -eq 0 ]; then
                        #
                        # Don't handle full opmn-restart. XXX
                        #
                        return 1
                fi

                # That's okay, it's not supposed to be!
                return 3
        fi

        #
        # Print out the PIDs for everyone.
        #
        echo "opmn is running..."
        echo "opmn components:"

        #
        # Check the OPMN-managed processes
        #
        get_opmn_proc_status OID || ((ct_errors++))
        get_opmn_proc_status HTTP_Server || ((ct_errors++))
        get_opmn_proc_status OC4J OC4J_SECURITY || ((ct_errors++))

        #
        # One or more OPMN-managed processes failed and could not be
        # restarted.
        #
        if [ $ct_errors -ne 0 ]; then
                return 1
        fi
        return 0
}


#
# Oracle needs the system's hostname to match the VIP.  RHCS needs to not be
# tinkering with the hostname.  Thus, we trick Oracle into believing that the
# hostname is the vhost by overloading gethostname().
#
hostname_hackery()
{
        if [ "`hostname`" = "$ORACLE_HOSTNAME" ]; then
                return 0
        fi

        PRELOADDIR=$ORACLE_HOME

cat > $PRELOADDIR/hostname.c <<EOT
/*
   Hack to make Oracle 10g work in failover environments
   without adjusting the hostname.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>

#ifndef ORACLE_HOSTNAME
#define ORACLE_HOSTNAME "$ORACLE_HOSTNAME"
#endif


int
gethostname(char *buf, size_t len)
{
        char *val = ORACLE_HOSTNAME;

        if (!buf || len <= 0) {
                errno = EINVAL;
                return -1;
        }

        memset(buf,0,len);
        if (!strlen(val))
                return 0;

        if (snprintf(buf, len, "%s", val) == len) {
                errno = ENAMETOOLONG;
                return -1;
        }

        return 0;
}
EOT

        if [ -e $PRELOADDIR/hostname.so ]; then
                export LD_PRELOAD=$PRELOADDIR/hostname.so
                return 0
        fi

        action "Creating hostname preload library:" gcc -o $PRELOADDIR/hostname.so $PRELOADDIR/hostname.c -shared -Wall -fPIC || return 1
        rm $PRELOADDIR/hostname.c

        export LD_PRELOAD=$PRELOADDIR/hostname.so
        return 0
}


#
# Helps us keep a running status so we know what our ultimate return
# code will be.  Returns 1 if the $1 and $2 are not equivalent, otherwise
# returns $1.  The return code is meant to be the next $1 when this is
# called, so, for example:
#
# update_status 0   <-- returns 0
# update_status $? 0 <-- returns 0
# update_status $? 3 <-- returns 1 (values different - error condition)
# update_status $? 1 <-- returns 1 (same, but happen to be error state!)
#
# update_status 3
# update_status $? 3 <-- returns 3
#
# (and so forth...)
#
update_status()
{
        declare -i old_status=$1
        declare -i new_status=$2

        if [ -z "$2" ]; then
                return $old_status
        fi

        if [ $old_status -ne $new_status ]; then
                return 1
        fi

        return $old_status
}


#
# Print an error message to the user and exit.
#
oops()
{
        echo "Please configure this script ($0) to"
        echo "match your installation."
        echo
        echo "    $1 failed validation checks."
        exit 1
}


#
# Do some validation on the user-configurable stuff at the beginning of the
# script.
#
validation_checks()
{
        #
        # If the oracle user doesn't exist, we're done.
        #
        [ -n "$ORACLE_USER" ] || oops ORACLE_USER
        id -u $ORACLE_USER > /dev/null || oops ORACLE_USER
        id -g $ORACLE_USER > /dev/null || oops ORACLE_USER

        #
        # If the oracle home isn't a directory, we're done
        #
        [ -n "$ORACLE_HOME" ] || oops ORACLE_HOME
        #[ -d "$ORACLE_HOME" ] || oops ORACLE_HOME

        #
        # If the oracle SID is NULL, we're done
        #
        [ -n "$ORACLE_SID" ] || oops ORACLE_SID

        #
        # If we don't know the type, we're done
        #
        [ "$ORACLE_TYPE" = "10g" ] || [ "$ORACLE_TYPE" = "10g-ias" ] || oops ORACLE_TYPE

        #
        # If the hostname is zero-length, fix it
        #
        [ -n "$ORACLE_HOSTNAME" ] || ORACLE_HOSTNAME=`hostname`

        #
        # Super user? Automatically change UID and exec as oracle user.
        # Oracle needs to be run as the Oracle user, not root!
        #
        if [ "`id -u`" = "0" ]; then
                echo "Restarting $0 as $ORACLE_USER."
                exec sudo -u $ORACLE_USER $0 $*
        fi

        #
        # If we're not root and not the Oracle user, we're done.
        #
        [ "`id -u`" = "`id -u $ORACLE_USER`" ] || exit 1
        [ "`id -g`" = "`id -g $ORACLE_USER`" ] || exit 1

        #
        # Go home.
        #
        cd $ORACLE_HOME
        pwd
        return 0
}


#
# Start Oracle9i Application Server Infrastructure
#
start_oracle()
{
        faction "Starting Oracle Database:" start_db || return 1
        action "Starting Oracle Listener:" lsnrctl start || return 1

                if [ -n "$LOCKFILE" ]; then
                touch $LOCKFILE
        fi
        return 0
}


#
# Stop Oracle9i Application Server Infrastructure
#
stop_oracle()
{
        if ! [ -e "$ORACLE_HOME/bin/lsnrctl" ]; then
                echo "Oracle Listener Control is not available"
                echo "    ($ORACLE_HOME not mounted?)"
                return 0
        fi

        
        faction "Stopping Oracle Database:" stop_db || return 1
        action "Stopping Oracle Listener:" lsnrctl stop
        faction "Waiting for all Oracle processes to exit:" exit_idle

        if [ $? -ne 0 ]; then
                echo "WARNING: Not all Oracle processes exited cleanly"
        fi

        if [ -n "$LOCKFILE" ]; then
                rm -f $LOCKFILE
        fi
        return 0
}


#
# Find and display the status of iAS infrastructure.
#
# This has three parts:
# (1) Oracle database itself
# (2) Oracle listener process
# (3) OPMN and OPMN-managed processes
#
# - If all are (cleanly) down, we return 3.  In order for this to happen,
# $LOCKFILE must not exist.  In this case, we try and restart certain parts
# of the service - as this may be running in a clustered environment.
#
# - If some but not all are running (and, if $LOCKFILE exists, we could not
# restart the failed portions), we return 1 (ERROR)
#
# - If all are running, return 0.  In the "all-running" case, we recreate
# $LOCKFILE if it does not exist.
#
status_oracle()
{
        declare -i subsys_lock=1
        declare -i last
        declare -i depth=$1

        #
        # Check for lock file.  Crude and rudimentary, but it works
        #
        if [ -z "$LOCKFILE" ] || [ -f $LOCKFILE ]; then
                subsys_lock=0
        fi

        # Check database status
        get_db_status $subsys_lock $depth
        update_status $? # Start
        last=$?

        # Check & report listener status
        get_lsnr_status $subsys_lock $depth
        update_status $? $last
        last=$?
      
        if [ "$ORACLE_TYPE" = "10g" ]; then
                # XXX Add isqlplus status check?!
                emctl status dbconsole 2>&1 | grep "is running"
                update_status $? $last
                last=$?
        elif [ "$ORACLE_TYPE" = "10g-ias" ]; then
                # Check & report opmn / opmn-managed process status
                get_opmn_status $subsys_lock $depth
                update_status $? $last
                last=$?
        fi

        #
        # No lock file, but everything's running.  Put the lock
        # file back. XXX - this kosher?
        #
        if [ $last -eq 0 ] && [ $subsys_lock -ne 0 ]; then
                touch $LOCKFILE
        fi

        return $last
}


########################
# Do some real work... #
########################
if [ "$1" = "meta-data" ]; then
        meta_data
        exit 0
fi

validation_checks $*

hostname_hackery || exit 1

case $1 in
        start)
                start_oracle
                exit $?
                ;;
        stop)
                stop_oracle
                exit $?
                ;;
        status|monitor)
                status_oracle $OCF_CHECK_LEVEL
                exit $?
                ;;
        restart)
                $0 stop || exit $?
                $0 start || exit $?
                exit 0
                ;;
        *)
                echo "usage: $SCRIPT {start|stop|status|restart|meta-data}"
                exit 1
                ;;
esac
exit 0

论坛徽章:
0
13 [报告]
发表于 2008-05-24 22:51 |只看该作者
各位大大们啊! 请支持一下啊!

论坛徽章:
0
14 [报告]
发表于 2008-05-24 23:09 |只看该作者
此问题难呀.........
最好是找SUN的工程师问吓.............他们在此方面比较强...........

论坛徽章:
0
15 [报告]
发表于 2008-05-25 00:44 |只看该作者
原帖由 hzbiz 于 2008-5-24 23:09 发表
此问题难呀.........
最好是找SUN的工程师问吓.............他们在此方面比较强...........



这个是linux下的脚本问题啊!

求职 : Linux运维
论坛徽章:
19
CU大牛徽章
日期:2013-03-13 15:15:0815-16赛季CBA联赛之山东
日期:2016-10-31 10:40:10综合交流区版块每日发帖之星
日期:2016-07-06 06:20:00IT运维版块每日发帖之星
日期:2016-02-08 06:20:00数据库技术版块每日发帖之星
日期:2016-01-15 06:20:00IT运维版块每日发帖之星
日期:2016-01-15 06:20:00IT运维版块每日发帖之星
日期:2016-01-10 06:20:00黄金圣斗士
日期:2015-11-24 10:45:10IT运维版块每日发帖之星
日期:2015-09-01 06:20:00IT运维版块每日发帖之星
日期:2015-08-13 06:20:00IT运维版块每日发帖之星
日期:2015-07-30 09:40:012015年亚洲杯之巴勒斯坦
日期:2015-05-05 10:19:03
16 [报告]
发表于 2008-05-25 09:49 |只看该作者
搂住能不能把配置的全过程写个文档给大家共享一下呀???
谢谢了

论坛徽章:
0
17 [报告]
发表于 2008-05-26 10:43 |只看该作者
楼主别幼稚,你跑生产环境嘛?ORACLE没技术支持嘛(盗版)?自己玩玩还可以,像你这样什么不懂如果直接跑生产环境的话将来出问题你要死人的。

论坛徽章:
0
18 [报告]
发表于 2008-05-27 10:15 |只看该作者
请问以上脚本有成功了的吗?尤其是监控功能.
我现在是生产环境,但是监控功能没有.
不敢轻易尝试.如果有那位大哥用以上脚本成功了的,麻烦共享一下成果
谢谢!

还有就是,这个脚本,oracle或者linux的官方不会给你,或者提供技术支持.
我的oracle和linux都是正版,打两家的技术支持都说由于涉及其他公司产品,不会提供双机环境下的脚本,一般都是集成商自己编写的.

我觉得启动和停止oracle的脚本倒好解决,最主要是监控oracle状态的脚本不好搞.
看到以上的那些脚本,我很高兴,但是由于没有测试环境,所以不敢轻易的换到生产环境中去.

论坛徽章:
0
19 [报告]
发表于 2008-05-27 12:41 |只看该作者
原帖由 七杀书生 于 2008-5-27 10:15 发表
请问以上脚本有成功了的吗?尤其是监控功能.
我现在是生产环境,但是监控功能没有.
不敢轻易尝试.如果有那位大哥用以上脚本成功了的,麻烦共享一下成果
谢谢!

还有就是,这个脚本,oracle或者linux的官方不会给 ...


我现在脚本手工启动没有问题了, 但是加入cluster中后, cluster启动脚本有问题, 不能启动这个脚本的服务,所以我想知道如何让cluster中, 自动的加入参数start、stop启动

你的可rhcs可以启动脚本的是如何设置的? 还是rhcs 自动的会加入参数 start 、stop 让脚本启动啊?

论坛徽章:
0
20 [报告]
发表于 2008-05-27 17:40 |只看该作者
现在发现的问题是, 似乎是cluster根本,没有启动我的脚本, 我脚本如果得到start 、stop 都会产生log
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP