Benutzer-Werkzeuge

Webseiten-Werkzeuge


Action unknown: siteexport_addpage
users:werner:saprc_en

SAP won't start

…and that is because of some reasons that are caused by the operating system? Exactly that was the case with a new installed SAP Solution Manager 4.0 (DB: Oracle, OS: SLES 10 x86_64)…

SAP support told me the cause for this problem was a name conflict between the SLES package sapinit and the SAP command „startsapserv“. As a workaround I had to uninstall the package „sapinit“.

Well, this is not hard to do (rpm -e sapinit). But the software had to start together with the system, so I wrote a startup script on my own:

#! /bin/bash
#
# /etc/init.d/ufzsap
#
#   and its symbolic link
#
# /usr/sbin/rcufzsap
#
### BEGIN INIT INFO
# Provides:       UFZSAP
# Required-Start: $remote_fs $syslog
# Should-Start:   sysstat
# Required-Stop:  $remote_fs $syslog
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description:    Control script for SAP systems
# Description:    Controls SAP systems installed on this machine
### END INIT INFO
 
# Fetch the boot script functions, if available
test -f /etc/rc.status && . /etc/rc.status
 
# get configuration data
CONFIGFILE=/etc/sysconfig/ufzsap
test -f $CONFIGFILE && . $CONFIGFILE
 
# Reset status of this service
rc_reset
 
# Figure out what to do, and do it;-)
case "$1" in
    start)
        for SAPSID in $UFZSAP_SYSTEMS; do
            SIDBIG=$(echo $SAPSID | tr /a-z/ /A-Z/)
            SIDSML=$(echo $SAPSID | tr /A-Z/ /a-z/)
            SIDADM="${SIDSML}adm"
            ORASID="ora${SIDSML}"
            su - $ORASID -c "/oracle/$SIDBIG/102_64/bin/lsnrctl start"
            su - $SIDADM -c "/sapmnt/$SIDBIG/exe/startsap"
        done
        rc_status -v
        ;;
    stop)
        for SAPSID in $UFZSAP_SYSTEMS; do
            SIDBIG=$(echo $SAPSID | tr /a-z/ /A-Z/)
            SIDSML=$(echo $SAPSID | tr /A-Z/ /a-z/)
            SIDADM="${SIDSML}adm"
            ORASID="ora${SIDSML}"
            su - $SIDADM -c "/sapmnt/$SIDBIG/exe/stopsap"
            su - $ORASID -c "/oracle/$SIDBIG/102_64/bin/lsnrctl stop"
        done
        rc_status -v
        ;;
    status)
        for SAPSID in $UFZSAP_SYSTEMS; do
            SIDBIG=$(echo $SAPSID | tr /a-z/ /A-Z/)
            SAPPROCS=$(ps ax | grep "dw.sap$SIDBIG" | grep -v grep | wc -l)
            ORAPROCS=$(ps ax | grep "oracle$SIDBIG" | grep -v grep | wc -l)
            JVAPROCS=$(ps ax | grep jlaunch | grep $SIDBIG | grep -v grep | wc -l)
            ICMPROCS=$(ps ax | grep icman | grep $SIDBIG | grep -v grep | wc -l)
            SSSPROCS=$(ps ax | grep sapstartsrv | grep $SIDBIG | grep -v grep | wc -l)
            echo "Processes for system $SIDBIG: $SAPPROCS d+w, $ORAPROCS Oracle, $JVAPROCS Java, $ICMPROCS ICM, $SSSPROCS sapstartserv"
        done
        rc_status -v
        ;;
    try-restart|restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: $0 {start|status|stop|restart|try-restart}"
        exit 1
        ;;
esac
rc_exit

BTW, the mentioned /etc/sysconfig/ufzsap contains only the line

UFZSAP_SYSTEMS="SID"

where SID is the SAP system ID for the installed SolMan. Multiple Systems may be given separated by blanks.

Afterwards, I entered

ln -s /etc/init.d/ufzsap /usr/sbin/rcufzsap
insserv ufzsap

and everything went smooth!

This page is also available in German.

users/werner/saprc_en.txt · Zuletzt geändert: 2007-11-19 0950 von werner

Falls nicht anders bezeichnet, ist der Inhalt dieses Wikis unter der folgenden Lizenz veröffentlicht: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki