Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to startup the 9i orcl-instance on suse linux 8

How to startup the 9i orcl-instance on suse linux 8

From: Rene Scharf <Rene.ScharfNoSpam_at_t-online.de>
Date: Tue, 3 Sep 2002 21:14:16 +0200
Message-ID: <al31n1$5q4$06$1@news.t-online.com>

Hello!

Im a Nwebee on Linux and have installed Oracle 9 on a suse 8 system. After the Installation the orcl-Instance run and I could get an connection on the Database.
Now i habe rebooted the system and my orcl don't run.

From a 8.1 Installation I've copied the

/etc/init.d/oracle
/etc/init.d/oratab
/etc/profile.d/oracle.sh
/etc/sysconfig/oracle

Now i Think the Listener run's because by try to connect i get a ORA-01034 Oracle not available
Only the database don't run.

Who can help me???

greetings René

Thise are the files

#### Begin /etc/init.d/oracle ####

#! /bin/sh
# Copyright (c) 1995-2001 SuSE GmbH Nuernberg, Germany.
#
# Author: SuSE Oracle Team <feedback_at_suse.de>
#
### BEGIN INIT INFO
# Provides: oracle
# Required-Start: $network $syslog $remote_fs $netdaemons
# Required-Stop:
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the Oracle database
### END INIT INFO

. /etc/rc.config
. /etc/sysconfig/oracle
. /etc/profile.d/oracle.sh


# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
. /etc/rc.status

# Get settings, if file(s) exist(s). If not, we simply use defaults.
if test -f /etc/rc.config.d/oracle.rc.config; then

    # new location is directory /etc/rc.config.d/     . /etc/rc.config.d/oracle.rc.config
else
  if test -f /etc/rc.config; then
    # old location was everything in one file     . /etc/rc.config
  fi
fi

# Kernel parameters for Oracle. This comes before the tests for
# START_ORACLE_DB so that this can be used
# even when those values are "no".

if [ "${SET_ORACLE_KERNEL_PARAMETERS:-no}" == "yes" -a "${1:-stop}" == "start" ]; then
  echo
  echo "Setting kernel parameters for Oracle from /etc/rc.config.d/oracle.rc.config."
  echo "See file /etc/rc.config.d/oracle.rc.config for explanations."

  if [ ! -d /proc/sys/kernel ]; then

      echo; echo "No sysctl kernel interface - cannot set kernel parameters."; echo
  else
    # Set shared memory parameters
    echo "Shared memory"
    test -f /proc/sys/kernel/shmmax || (echo; echo "Detected a 2.2 kernel, can only set SHMMAX."; echo)

    test -f /proc/sys/kernel/shmmax && echo "  SHMMAX:
${SHMMAX:-2147483647}"
    test -f /proc/sys/kernel/shmmax && echo ${SHMMAX:-2147483647} >
/proc/sys/kernel/shmmax

    test -f /proc/sys/kernel/shmmni && echo " SHMMNI: ${SHMMNI:-4096}"     test -f /proc/sys/kernel/shmmni && echo ${SHMMNI:-4096} > /proc/sys/kernel/shmmni

    test -f /proc/sys/kernel/shmall && echo " SHMALL: ${SHMALL:-2097152}"     test -f /proc/sys/kernel/shmall && echo ${SHMALL:-2097152} > /proc/sys/kernel/shmall

    # Set the semaphore parameters:
    # see Oracle release notes for Linux for how to set these values
    # SEMMSL, SEMMNS, SEMOPM, SEMMNI

    echo "Semaphore values"
    test -f /proc/sys/kernel/sem && echo "  SEMMSL: ${SEMMSL:-250}"
    test -f /proc/sys/kernel/sem && echo "  SEMMNS: ${SEMMNS:-32000}"
    test -f /proc/sys/kernel/sem && echo "  SEMOPM: ${SEMOPM:-100}"
    test -f /proc/sys/kernel/sem && echo "  SEMMNI: ${SEMMNI:-256}"
    test -f /proc/sys/kernel/sem && echo ${SEMMSL:-250} ${SEMMNS:-32000}
${SEMOPM:-100} ${SEMMNI:-128} > /proc/sys/kernel/sem
  fi

  echo -n "Kernel parameters are set for Oracle."   rc_status -v
  echo
fi

# Set reasonable defaults if nothing has been set by now.
if [ -z "$ORACLE_OWNER" ]; then
  ORACLE_OWNER=oracle

  START_ORACLE_DB="no"
  START_ORACLE_DB_LISTENER="yes"
  START_ORACLE_DB_AGENT="no"
  START_ORACLE_DB_APACHE="no"
  START_ORACLE_DB_CMANAGER="no"
  START_ORACLE_DB_IFS="no"
  START_ORACLE_DB_OID="no"

fi

# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}

# Force execution if not called by a runlevel directory.
test $link = $base && START_ORACLE_DB="yes" test "${START_ORACLE_DB:-no}" = "yes" || exit 0

# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status

# First reset status of this service

rc_reset

# THIS IS A WORKAROUND (for JServ in 9i and iAS 9i)
# In file $ORACLE_HOME/Apache/Jserv/etc/jserv.properties
# Oracle insists on making available a DISPLAY variable.
# Because of this starting/stopping of Apache fails
# if DISPLAY is not set, so we set it to some dummy value.
# It does not hurt anything else.

test -z "$DISPLAY" && export DISPLAY=":42.0"

#-# # get and check environment (e.g. ORACLE_HOME)
#-# test -f /etc/profile.d/oracle.sh && . /etc/profile.d/oracle.sh
#-# if [ -z "$ORACLE_HOME" -o ! -d $ORACLE_HOME -o -z "$ORACLE_SID" ]; then
#-# echo "Cannot find ORACLE_HOME directory, or ORACLE_SID not set."
#-# echo -n "Environment settings are wrong? Check
/etc/profile.d/oracle.sh"
#-# rc_failed
#-# rc_status -v
#-# rc_exit
#-# exit 1
#-# fi

#-# # the database will not start if the entry in /etc/oratab is "N"
#-# grep -s -q "$ORACLE_SID:$ORACLE_HOME:Y" /etc/oratab >&/dev/null || {
#-# echo -n "No start entry for this ORACLE_SID/ORACLE_HOME in
/etc/oratab"
#-# rc_failed
#-# rc_status -v
#-# rc_exit
#-# exit 1
#-# }

# we use the Oracle provided scripts dbstart/dbshut for startup/shutdown
# of the database itself

if [ ! -f $ORACLE_HOME/bin/dbstart -o -z "$ORACLE_OWNER" ]; then   echo "No such file: \$ORACLE_HOME/bin/dbstart"   echo -n "Oracle could not be found (ORACLE_HOME wrong?)"

  rc_failed
  rc_status -v
  rc_exit

  exit 1
fi

# Oracle 8i uses a different command than 9i to start/stop the
# Intelligent Agent

if test -x $ORACLE_HOME/bin/agentctl; then   # Oracle 9i
  AGENT_START="$ORACLE_HOME/bin/agentctl start"   AGENT_STOP="$ORACLE_HOME/bin/agentctl stop" else
  # Oracle 8i
  AGENT_START="$ORACLE_HOME/bin/lsnrctl dbsnmp_start"   AGENT_STOP="$ORACLE_HOME/bin/lsnrctl dbsnmp_stop" fi

# Here we finally get to do the real work.
case "$1" in
  start)

      echo "Starting up Oracle:"

      su - $ORACLE_OWNER -c ". ./.profile; $ORACLE_HOME/bin/dbstart"
      test "${START_ORACLE_DB_LISTENER:-no}"   = "yes" && test -x
$ORACLE_HOME/bin/lsnrctl                 && su - $ORACLE_OWNER -c
"$ORACLE_HOME/bin/lsnrctl start"
      test "${START_ORACLE_DB_APACHE:-no}"     = "yes" && test -x
$ORACLE_HOME/Apache/Apache/bin/apachectl && su - $ORACLE_OWNER -c "$ORACLE_HOME/Apache/Apache/bin/apachectl start"
      test "${START_ORACLE_DB_CMANAGER:-no}"   = "yes" && test -x
$ORACLE_HOME/bin/cmctl                   && su - $ORACLE_OWNER -c
"$ORACLE_HOME/bin/cmctl start"
      test "${START_ORACLE_DB_AGENT:-no}"      = "yes" && test -x
$ORACLE_HOME/bin/agentctl                && su - $ORACLE_OWNER -c
"$AGENT_START"
   test "${START_ORACLE_DB_IFS:-no}"     = "yes" && (echo; echo "Starting
Oracle IFS: Not yet implemented."; echo)
   test "${START_ORACLE_DB_OID:-no}"     = "yes" && (echo; echo "Starting
Oracle OID: Not yet implemented."; echo)
      rc_status -v
      ;;
  stop)
      echo "Shutting down Oracle:"

      test -x $ORACLE_HOME/bin/lsnrctl                 && su -
$ORACLE_OWNER -c "$AGENT_STOP"
      test -x $ORACLE_HOME/bin/cmctl                   && su -
$ORACLE_OWNER -c "$ORACLE_HOME/bin/cmctl stop"
      test -x $ORACLE_HOME/Apache/Apache/bin/apachectl && su -
$ORACLE_OWNER -c "$ORACLE_HOME/Apache/Apache/bin/apachectl stop"
      test -x $ORACLE_HOME/bin/lsnrctl                 && su -
$ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
      su - $ORACLE_OWNER -c ". ./.profile; $ORACLE_HOME/bin/dbshut"

      rc_status -v
      ;;
  *)
      echo "Usage: $0 {start|stop}"
      exit 1

esac
rc_exit
#### End /etc/init.d/oracle ####

#### Begin /etc/init.d/oratab ####

orcl:/data1/moonbreaker/OraHome1:Y
#### End /etc/init.d/oratab ####

#### Begin /etc/sysconfig/oracle ####

ORACLE_OWNER=moonbreaker

START_ORACLE_DB="yes"
START_ORACLE_DB_LISTENER="yes"
START_ORACLE_DB_AGENT="no"
START_ORACLE_DB_APACHE="no"
START_ORACLE_DB_CMANAGER="no"
START_ORACLE_DB_IFS="no"
START_ORACLE_DB_OID="no"

SET_ORACLE_KERNEL_PARAMETERS="yes"
SHMMAX=1073741824
SHMMNI=4096
SHMALL=2097152
SEMMSL=250
SEMMNS=32000
SEMOPM=100
SEMMNI=256

#### End /etc/sysconfig/oracle ####

#### Begin /etc/profile.d/oracle.sh ####

# login environment variable settings for Oracle

# change these settings according to your installation
ORACLE_BASE=/data1/moonbreaker
# ORACLE_SID=mydb

ORACLE_HOME=$ORACLE_BASE/OraHome1
TNS_ADMIN=$ORACLE_HOME/network/admin

ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$ORACLE_HOME/lib:$ORACL E_HOME/ctx/lib
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE _HOME/network/jlib

export ORACLE_BASE ORACLE_HOME ORA_NLS33 ORACLE_SID PATH LD_LIBRARY_PATH CLASSPATH TNS_ADMIN
#### End /etc/profile.d/oracle.sh ####
Received on Tue Sep 03 2002 - 14:14:16 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US