免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
123下一页
最近访问板块 发新帖
查看: 8988 | 回复: 23
打印 上一主题 下一主题

如何使Oracle10g在HPUX11下开机自动启动关机自动关闭?! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-09-13 18:32 |只看该作者 |倒序浏览
在#下运行:
#su - oracle
$/opt/oracle/bin/dbstart

提示监听启动错误
LSNRCTL for HPUX: Version 10.2.0.1.0 - Production on 13-SEP-2006 11:31:38

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Message 1070 not found; No message file for product=network, facility=TNSTNS-12545: Message 12545 not found; No message file for product=network, facility=TNS
TNS-12560: Message 12560 not found; No message file for product=network, facility=TNS
  TNS-00515: Message 515 not found; No message file for product=network, facility=TNS
   HPUX Error: 2: No such file or directory

而用ORACLE登录运行dbstart就能正常的执行。在这种情况下,应该如何在/sbin/rc.d中添加启动和关闭脚本??

论坛徽章:
0
2 [报告]
发表于 2006-09-13 22:14 |只看该作者
oracle环境变量没有生效?
编写一个脚本, 设置ORACLE_HOME, ORACLE_BASE, ORACLE_SID等环境变量, 并启动数据库.
然后让系统启动后运行这个脚本.

论坛徽章:
0
3 [报告]
发表于 2006-09-14 15:57 |只看该作者
原帖由 blue_stone 于 2006-9-13 22:14 发表
oracle环境变量没有生效?
编写一个脚本, 设置ORACLE_HOME, ORACLE_BASE, ORACLE_SID等环境变量, 并启动数据库.
然后让系统启动后运行这个脚本.


我把oracle下的.dtprofile中的环境变量文件添加到dbstart文件里,并且在启动监听和数据库之前,但执行dbstart时还是有关于监听的错误。

dbstart.JPG (65.98 KB, 下载次数: 83)

执行dbstart后的报错

执行dbstart后的报错

dbshut.JPG (64.22 KB, 下载次数: 82)

执行dbshut后的报错

执行dbshut后的报错

论坛徽章:
0
4 [报告]
发表于 2006-09-14 16:35 |只看该作者
把两个脚本放在/sbin/rc2.d中并重新启动服务器后,数据库没有运行脚本并没有执行,通过ps -u oracle没有任何结果显示。添加脚本文件还需要什么特别注意的吗?!

论坛徽章:
0
5 [报告]
发表于 2006-09-14 21:19 |只看该作者
脚本能贴出来看看么?
我还是感觉你的脚本中环境变量设置有问题

论坛徽章:
0
6 [报告]
发表于 2006-09-14 21:39 |只看该作者
原帖由 noise 于 2006-9-14 16:35 发表
把两个脚本放在/sbin/rc2.d中并重新启动服务器后,数据库没有运行脚本并没有执行,通过ps -u oracle没有任何结果显示。添加脚本文件还需要什么特别注意的吗?!


启动oracle脚本最好放在rc3.d,命名格式Sxxx, 注意权限 chown bin:bin Sxxx
关闭oracle脚本(如果启动是放在rc3.d)应该放在rc2.d, 命名格式Kxxx,

手工执行该脚本能否执行成功。

论坛徽章:
0
7 [报告]
发表于 2006-09-15 08:39 |只看该作者
HP-UX没用过,就SOLARIS下的情况而言,有这样几点
首先,应该注意你的.profile,而不是.dtprofile
其次,自动启动和关闭的脚本可以写成这样
su - oracle -c "dbstart; lsnrctl start"
还有就是,启动脚本建议用S99...,关闭脚本建议用K00...

论坛徽章:
0
8 [报告]
发表于 2006-09-15 09:12 |只看该作者
原帖由 blue_stone 于 2006-9-14 21:19 发表
脚本能贴出来看看么?
我还是感觉你的脚本中环境变量设置有问题


dbstart:

:
#
# $Id: dbstart.sh.pp 11-may-2005.18:18:07 vikrkuma Exp $
# Copyright (c) 1991, 2005, Oracle. All rights reserved.  
#

###################################
#
# usage: dbstart
#
# This script is used to start ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
# This script will start all databases listed in the oratab file
# whose third field is a "Y".  If the third field is set to "Y" and
# there is no ORACLE_SID for an entry (the first field is a *),
# then this script will ignore that entry.
#
# This script requires that ASM ORACLE_SID's start with a +, and
# that non-ASM instance ORACLE_SID's do not start with a +.
#
# If ASM instances are to be started with this script, it cannot
# be used inside an rc*.d directory, and should be invoked from
# rc.local only. Otherwise, the CSS service may not be available
# yet, and this script will block init from completing the boot
# cycle.
#
# Note:
# Use ORACLE_TRACE=T for tracing this script.
#
# The progress log for each instance bringup plus Error and Warning message
# are logged in file $ORACLE_HOME/startup.log. The error messages related to
# instance bringup are also logged to syslog (system log module).
# The Listener log is located at $ORACLE_HOME_LISTNER/listener.log
#
# To configure:
# 1) Set ORATAB:
#    On Solaris
#      ORATAB=/var/opt/oracle/oratab
#    All other UNIX platforms
#      ORATAB=/etc/oratab
#
# 2) Update $ORATAB/oratab with Database Instances that need to be started up.
#    Entries are of the form:
#    $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#    An example entry:
#    main:/usr/lib/oracle/emagent_10g:Y
#
# 3) Set ORACLE_HOME_LISTNER
#    Set this to enable auto startup for Oracle Net Listener.
#    The script uses this find the binary to start Net Listener.
#
#    Also, if the listener name is not the default name LISTENER, you must
#    specify the listener name in the stop and start commands:
#    $ORACLE_HOME/bin/lsnrctl {start|stop} listener_name
#
#####################################

LOGMSG="logger -puser.alert -s "

trap 'exit' 1 2 3

# for script tracing
case $ORACLE_TRACE in
    T) set -x ;;
esac
   
# Set path if path not set (if called from /etc/rc)
case $PATH in
    "") ORACLE_BASSE=/opt/oracle
        ORACLE_HOME=/opt/oracle
        ORACLE_SID=orcl
        ORACLE_TERM=xterm
        export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERM
        NLS_LANG=american_america.ZHS16GB231280
        exprot NLS_LANG
        ORA_LNS33=$ORACLE_HOME/ocommon/nls/admin/data
        exprot ORA_LNS33
        

LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib:/usr/lib:$ORACLE_HOME/RDBMS/

lib:$ORACLE_HOME/lib32
        SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
        export SHLIB_PATH LD_LIBRARY_PATH
        

PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/bin:$ORACLE_HOME/bin:/usr/contrib

/bin:/$PATH
        export PATH
        CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
        CLASSPATH=$CLASSPAHT:$ORACLE_HOME/network/jlib
        exprot CLASSPATH
        


PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/bin:$ORACLE_HOME/bin:/usr/contrib

/bin:/$PATH
        export PATH ;;
esac

# Save LD_LIBRARY_PATH
SAVE_LLP=$LD_LIBRARY_PATH

# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/opt/oracle
export ORACLE_HOME_LISTNER
if [ ! $ORACLE_HOME_LISTNER ] ; then
  echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"
else
  LOG=$ORACLE_HOME_LISTNER/listener.log

  # Start Oracle Net Listener
  $ORACLE_HOME_LISTNER/bin/lsnrctl start
fi

# Set this in accordance with the platform
ORATAB=/etc/oratab
if [ ! $ORATAB ] ; then
  echo "Set ORATAB to dir where oratab file is located"
  exit 1;
fi

# Checks Version Mismatch between Listener and Database Instance.
# A version 10 listener is required for an Oracle Database 10g database.
# Previous versions of the listener are not supported for use with an Oracle
# Database 10g database. However, it is possible to use a version 10 listener
# with previous versions of the Oracle database.
checkversionmismatch() {
  if [ $VER10LIST ] ; then
    VER10INST=`sqlplus -V | grep "Release " | cut -d' ' -f3 | cut -d'.' -f1`
    case $VER10INST in
      "10")
      if [ $VER10LIST != "10" ] ; then
        $LOGMSG "Warning: Version 10 listener is required for Oracle Database 10g"
        $LOGMSG "Version $VER10LIST for Listener is NOT supported with Database

version $VER10INST"
        $LOGMSG "Restart Oracle Net Listener using an alternate

ORACLE_HOME_LISTNER: lsnrctl start"
      fi
      ;;
      *) ;;
    esac
  fi
}

# Starts a Database Instance
startinst() {
  # Called programs use same database ID
  export ORACLE_SID

  # Put $ORACLE_HOME/bin into PATH and export.
  PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ; export PATH
  # add for bug # 652997
  LD_LIBRARY_PATH=${SAVE_LLP}:${ORACLE_HOME}/lib ; export LD_LIBRARY_PATH
  PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora
  SPFILE=${ORACLE_HOME}/dbs/spfile${ORACLE_SID}.ora
  SPFILE1=${ORACLE_HOME}/dbs/spfile.ora

  echo ""
  echo "$0: Starting up database \"$ORACLE_SID\""
  date
  echo ""

  checkversionmismatch

  # See if it is a V6 or V7 database
  VERSION=undef
  if [ -f $ORACLE_HOME/bin/sqldba ] ; then
    SQLDBA=sqldba
    VERSION=`$ORACLE_HOME/bin/sqldba command=exit | awk '
      /SQL\*DBA: (Release|Version)/ {split($3, V, ".") ;
      print V[1]}'`
    case $VERSION in
      "6") ;;
      *) VERSION="internal" ;;
    esac
  else
    if [ -f $ORACLE_HOME/bin/svrmgrl ] ; then
      SQLDBA=svrmgrl
      VERSION="internal"
    else
      SQLDBA="sqlplus /nolog"
    fi
  fi

  STATUS=1
  if [ -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.dbf ] ; then
    STATUS="-1"
  fi
  if [ -f $ORACLE_HOME/dbs/sgadef${ORACLE_SID}.ora ] ; then
    STATUS="-1"
  fi
  pmon=`ps -ef | egrep pmon_$ORACLE_SID  | grep -v grep`
  if [ "$pmon" != "" ];
  then
    STATUS="-1"
    $LOGMSG "Warning: ${INST} \"${ORACLE_SID}\" already started."
  fi

  if test $STATUS -eq -1 ; then
    $LOGMSG "Warning: ${INST} \"${ORACLE_SID}\" possibly left running when system

went down (system crash?)."
    $LOGMSG "Action: Notify Database Administrator."
    case $VERSION in
      "6")  sqldba "command=shutdown abort" ;;
      "internal")  $SQLDBA $args <<EOF
connect internal
shutdown abort
EOF
        ;;
      *)  $SQLDBA $args <<EOF
connect / as sysdba
shutdown abort
quit
EOF
        ;;
    esac

    if test $? -eq 0 ; then
      STATUS=1
    else
      $LOGMSG "Error: ${INST} \"${ORACLE_SID}\" NOT started."
    fi
  fi

  if test $STATUS -eq 1 ; then
    if [ -f $SPFILE -o -f $SPFILE1 -o -f $PFILE ] ; then
      case $VERSION in
        "6")  sqldba command=startup ;;
        "internal")  $SQLDBA <<EOF
connect internal
startup
EOF
          ;;
        *)  $SQLDBA <<EOF
connect / as sysdba
startup
quit
EOF
          ;;
      esac

      if test $? -eq 0 ; then
        echo ""
        echo "$0: ${INST} \"${ORACLE_SID}\" warm started."
      else
        $LOGMSG ""
        $LOGMSG "Error: ${INST} \"${ORACLE_SID}\" NOT started."
      fi
    else
      $LOGMSG ""
      $LOGMSG "Can't find init file for ${INST} \"${ORACLE_SID}\"."
      $LOGMSG "Error: ${INST} \"${ORACLE_SID}\" NOT started."
    fi
  fi
}

# Starts an ASM Instance
startasminst() {
  # Called programs use same database ID
  export ORACLE_SID
  ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
  # Called scripts use same home directory
  export ORACLE_HOME

  # For ASM instances, we have a dependency on the CSS service.
  # Wait here for it to become available before instance startup.

  # Is the 10g install intact? Are all necessary binaries present?
  if [ ! -f $ORACLE_HOME/bin/crsctl ]; then
    $LOGMSG "$ORACLE_HOME/bin/crsctl not found when attempting to start"
    $LOGMSG "  ASM instance $ORACLE_SID."

  else
    COUNT=0
    $ORACLE_HOME/bin/crsctl check css
    RC=$?
    while [ "$RC" != "0" ];
    do
    COUNT=$((COUNT+1))
    if [ $COUNT = 15 ] ; then
      # 15 tries with 20 sec interval => 5 minutes timeout
      $LOGMSG "Timed out waiting to start ASM instance $ORACLE_SID"         
      $LOGMSG "  CSS service is NOT available."
      exit $COUNT
    fi
    $LOGMSG "Waiting for Oracle CSS service to be available before starting "
    $LOGMSG " ASM instance $ORACLE_SID. Wait $COUNT."

    sleep 20
    $ORACLE_HOME/bin/crsctl check css
    RC=$?
    done
  fi
  startinst
}

# Start of dbstartup script
#
# Loop for every entry in oratab file and and try to start
# that ORACLE.
#
# ASM instances need to be started before 'Database instances'
# ASM instance is identified with '+' prefix in ORACLE_SID
# Following loop brings up ASM instance

cat $ORATAB | while read LINE
do
case $LINE in
  \#*)                ;;        #comment-line in oratab
  *)
  # Proceed only if last field is 'Y'.
  # Entries whose last field is not Y or N are not DB entry, ignore them.
  if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then
    ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
    if [ "$ORACLE_SID" = '*' ] ; then
      # same as NULL SID - ignore this entry
      ORACLE_SID=""
      continue
    fi
    # For ASM instances, we have a dependency on the CSS service.
    # Wait here for it to become available before instance startup.
    if [ `echo $ORACLE_SID | cut -b 1` = '+' ]; then
      INST="ASM instance"
      ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
      # Called scripts use same home directory
      export ORACLE_HOME
      # file for logging script's output
      LOG=$ORACLE_HOME/startup.log
      touch $LOG
      chmod a+r $LOG
      echo "Processing $INST \"$ORACLE_SID\": log file $ORACLE_HOME/startup.log"
      startasminst >> $LOG 2>&1
    fi
  fi
  ;;
esac
done

# exit if there was any trouble bringing up ASM instance
if [ "$?" != "0" ] ; then
  exit 2
fi

#
# Following loop brings up 'Database instances'
#
cat $ORATAB | while read LINE
do
case $LINE in
  \#*)                ;;        #comment-line in oratab
  *)
  # Proceed only if last field is 'Y'.
  # Entries whose last field is not Y or N are not DB entry, ignore them.
  if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then
    ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
    if [ "$ORACLE_SID" = '*' ] ; then
      # same as NULL SID - ignore this entry
      ORACLE_SID=""
      continue
    fi
    # For ASM instances, we have a dependency on the CSS service.
    # Wait here for it to become available before instance startup.
    if [ `echo $ORACLE_SID | cut -b 1` != '+' ]; then
      INST="Database instance"
      ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
      # Called scripts use same home directory
      export ORACLE_HOME
      # file for logging script's output
      LOG=$ORACLE_HOME/startup.log
      touch $LOG
      chmod a+r $LOG
      echo "Processing $INST \"$ORACLE_SID\": log file $ORACLE_HOME/startup.log"
      startinst >> $LOG 2>&1
    fi
  fi
  ;;
esac
done


dbshut:

:
#
# $Id: dbshut.sh.pp 11-may-2005.19:37:00 vikrkuma Exp $
# Copyright (c) 1991, 2005, Oracle. All rights reserved.  
#

###################################
#
# usage: dbshut
#
# This script is used to shutdown ORACLE from /etc/rc(.local).
# It should ONLY be executed as part of the system boot procedure.
#
# This script will shutdown all databases listed in the oratab file
# whose third field is a "Y".  If the third field is set to "Y" and
# there is no ORACLE_SID for an entry (the first field is a *),
# then this script will ignore that entry.
#
# This script requires that ASM ORACLE_SID's start with a +, and
# that non-ASM instance ORACLE_SID's do not start with a +.
#
# Note:
# Use ORACLE_TRACE=T for tracing this script.
# Oracle Net Listener is NOT shutdown using this script.
#
# The progress log for each instance shutdown is logged in file
# $ORACLE_HOME/shutdown.log.
#
# To configure:
# 1) Set ORATAB:
#    On Solaris
#      ORATAB=/var/opt/oracle/oratab
#    All other UNIX platforms
#      ORATAB=/etc/oratab
#
# 2) Update $ORATAB/oratab with Database Instances that need to be shutdown.
#    Entries are of the form:
#    $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#    An example entry:
#    main:/usr/lib/oracle/emagent_10g:Y
#
#####################################

trap 'exit' 1 2 3
case $ORACLE_TRACE in
T) set -x ;;
esac

# Set path if path not set (if called from /etc/rc)
case $PATH in
  "") ORACLE_BASSE=/opt/oracle
      ORACLE_HOME=/opt/oracle
      ORACLE_SID=orcl
      ORACLE_TERM=xterm
      export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_TERM
      NLS_LANG=american_america.ZHS16GB231280
      exprot NLS_LANG
      ORA_LNS33=$ORACLE_HOME/ocommon/nls/admin/data
      exprot ORA_LNS33
      LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/ctx/lib:/usr/lib:$ORACLE_HOME/RDBMS/lib:$ORACLE_HOME/lib32
      SHLIB_PATH=$ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32
      export SHLIB_PATH LD_LIBRARY_PATH
      PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/bin:$ORACLE_HOME/bin:/usr/contrib/bin:/$PATH
      export PATH
      CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
      CLASSPATH=$CLASSPAHT:$ORACLE_HOME/network/jlib
      exprot CLASSPATH
      PATH=/bin:/usr/bin:/usr/sbin:/opt/bin:/usr/local/bin:$ORACLE_HOME/bin:/usr/contrib/bin:/$PATH
      export PATH ;;
esac

# Save LD_LIBRARY_PATH
SAVE_LLP=$LD_LIBRARY_PATH

# Set this in accordance with the platform
ORATAB=/etc/oratab
if [ ! $ORATAB ] ; then
  echo "Set ORATAB to dir where oratab file is located"
  exit 1;
fi

# Stops an instance
stopinst() {
  ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
  if [ "$ORACLE_SID" = '*' ] ; then
    ORACLE_SID=""
  fi
# Called programs use same database ID
  export ORACLE_SID
  ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
# Called scripts use same home directory
  export ORACLE_HOME
# Put $ORACLE_HOME/bin into PATH and export.
  PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/etc ; export PATH
# add for bug 652997
  LD_LIBRARY_PATH=${SAVE_LLP}:${ORACLE_HOME}/lib ; export LD_LIBRARY_PATH
  PFILE=${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora

# See if it is a V6 or V7 database
  VERSION=undef
  if [ -f $ORACLE_HOME/bin/sqldba ] ; then
    SQLDBA=sqldba
    VERSION=`$ORACLE_HOME/bin/sqldba command=exit | awk '
      /SQL\*DBA: (Release|Version)/ {split($3, V, ".") ;
      print V[1]}'`
    case $VERSION in
      "6") ;;
      *) VERSION="internal" ;;
    esac
  else
    if [ -f $ORACLE_HOME/bin/svrmgrl ] ; then
      SQLDBA=svrmgrl
      VERSION="internal"
    else
      SQLDBA="sqlplus /nolog"
    fi
  fi

  case $VERSION in
    "6")  sqldba command=shutdown ;;
    "internal")  $SQLDBA <<EOF
connect internal
shutdown immediate
EOF
     ;;
     *)  $SQLDBA <<EOF
connect / as sysdba
shutdown immediate
quit
EOF
     ;;
  esac

  if test $? -eq 0 ; then
    echo "${INST} \"${ORACLE_SID}\" shut down."
  else
    echo "${INST} \"${ORACLE_SID}\" not shut down."
  fi
}

#
# Loop for every entry in oratab file and and try to shut down
# that ORACLE
#
# Following loop shuts down 'Database Instance'

cat $ORATAB | while read LINE
do
  case $LINE in
    \#*)                ;;        #comment-line in oratab
    *)
    # Proceed only if last field is 'Y'.
    # Entries whose last field is not Y or N are not DB entry, ignore them.
    if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then
      ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
      if [ "$ORACLE_SID" = '*' ] ; then
        # NULL SID - ignore
        ORACLE_SID=""
        continue
      fi
    if [ `echo $ORACLE_SID | cut -b 1` != '+' ]; then
      INST="Database instance"
      ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
      LOG=$ORACLE_HOME/shutdown.log
      stopinst >> $LOG 2>&1
    fi
  fi
  ;;
  esac
done

#
# Following loop shuts down 'ASM Instance'
#

cat $ORATAB | while read LINE
do
  case $LINE in
    \#*)                ;;        #comment-line in oratab
    *)
    # Proceed only if last field is 'Y'.
    # Entries whose last field is not Y or N are not DB entry, ignore them.
    if [ "`echo $LINE | awk -F: '{print $NF}' -`" = "Y" ] ; then
      ORACLE_SID=`echo $LINE | awk -F: '{print $1}' -`
      if [ "$ORACLE_SID" = '*' ] ; then
        # NULL SID - ignore
        ORACLE_SID=""
        continue
      fi
    if [ `echo $ORACLE_SID | cut -b 1` = '+' ]; then
      INST="ASM instance"
      ORACLE_HOME=`echo $LINE | awk -F: '{print $2}' -`
      LOG=$ORACLE_HOME/shutdown.log
      stopinst >> $LOG 2>&1
    fi
  fi
  ;;
  esac
done

# Stop Oracle Net Listener
$ORACLE_HOME/bin/lsnrctl stop



红色部分是我后加的。另外,dbstart里关于监听的启动原来是有一组判断,我给简化成“$ORACLE_HOME_LISTNER/bin/lsnrctl start”。

[ 本帖最后由 blue_stone 于 2006-9-15 09:23 编辑 ]

论坛徽章:
0
9 [报告]
发表于 2006-09-15 09:23 |只看该作者
su - oracle后,set|grep ORACLE
把结果贴一下

论坛徽章:
0
10 [报告]
发表于 2006-09-15 09:32 |只看该作者
原帖由 numenhuang 于 2006-9-14 21:39 发表


启动oracle脚本最好放在rc3.d,命名格式Sxxx, 注意权限 chown bin:bin Sxxx
关闭oracle脚本(如果启动是放在rc3.d)应该放在rc2.d, 命名格式Kxxx,

手工执行该脚本能否执行成功。


原来确实没注意文件所有权,现在改了系统启动的后“su -u oracle”仍然没有结果。手工执行的时候只有监听无法启动。根据文档的提示我把脚本从“/sbin/rc2.d”移动到“/etc/rc。config.d”里,在系统启动和关闭的过程中都有报错:

/sbin/rc[67]: su: not found.
/sbin/rc[67]: su: not found.

stty: : Not a typewriter
.
.
.

stty: : Not a typewriter
有多少个oeacle进程就有多少错误。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP