comp:saprc
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | Letzte ÜberarbeitungBeide Seiten der Revision | ||
comp:saprc [2010-05-16 13:49] – Erweiterung um optionalen DB-Start werner | comp:saprc [2010-06-08 14:09] – Fipptehler werner | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== SAP will nicht starten ====== | ||
+ | |||
+ | ...und zwar aus Gründen, die vermutlich am Betriebssystem liegen? Genau das lag bei einem neu installierten SAP Solution Manager (DB: Oracle 10.2.0.2, OS: SUSE Linux Enterprise Server 10, Architektur: | ||
+ | |||
+ | Der SAP-Support teilte mir mit, dass das Problem aus einem Namenskonfikt zwischen dem Novell-Paket " | ||
+ | |||
+ | Naja, wenn es weiter nichts ist... :-( Aber schließlich sollte die Software bei einem Rechnerstart automatisch starten, also habe ich ein eigenes rc-Script geschrieben: | ||
+ | |||
+ | <code bash> | ||
+ | #! /bin/bash | ||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | # and its symbolic link | ||
+ | # | ||
+ | # / | ||
+ | # | ||
+ | ### BEGIN INIT INFO | ||
+ | # Provides: | ||
+ | # Required-Start: | ||
+ | # Should-Start: | ||
+ | # Required-Stop: | ||
+ | # Default-Start: | ||
+ | # Default-Stop: | ||
+ | # Short-Description: | ||
+ | # Description: | ||
+ | ### END INIT INFO | ||
+ | |||
+ | # Fetch the boot script functions, if available | ||
+ | test -f / | ||
+ | |||
+ | # get configuration data | ||
+ | CONFIGFILE=/ | ||
+ | test -f $CONFIGFILE && . $CONFIGFILE | ||
+ | |||
+ | # Reset status of this service | ||
+ | rc_reset | ||
+ | |||
+ | # Figure out what to do, and do it ;-) | ||
+ | case " | ||
+ | start) | ||
+ | for SAPSID in $MYSAP_SYSTEMS; | ||
+ | # set some variables, | ||
+ | # SAP system ID in upper and lower case letters | ||
+ | SIDBIG=$(echo $SAPSID | tr /a-z/ /A-Z/) | ||
+ | SIDSML=$(echo $SAPSID | tr /A-Z/ /a-z/) | ||
+ | # and the SAP sidadm: | ||
+ | SIDADM=" | ||
+ | # if requested, start the Oracle database first | ||
+ | case $MYSAP_ORASID in | ||
+ | *${SAPSID}*) | ||
+ | # the Oracle user: | ||
+ | ORASID=" | ||
+ | # first start the Oracle listener as Oracle user | ||
+ | su - $ORASID -c "/ | ||
+ | # now start the SAP system as SAP user | ||
+ | su - $SIDADM -c "/ | ||
+ | ;; | ||
+ | *) | ||
+ | # start the SAP system, not the DB | ||
+ | su - $SIDADM -c "/ | ||
+ | ;; | ||
+ | esac | ||
+ | done | ||
+ | rc_status -v | ||
+ | ;; | ||
+ | stop) | ||
+ | for SAPSID in $MYSAP_SYSTEMS; | ||
+ | # set some variables, | ||
+ | # SAP system ID in upper and lower case letters | ||
+ | SIDBIG=$(echo $SAPSID | tr /a-z/ /A-Z/) | ||
+ | SIDSML=$(echo $SAPSID | tr /A-Z/ /a-z/) | ||
+ | # and the SAP sidadm: | ||
+ | SIDADM=" | ||
+ | # if requested, the DB is shutdown too: | ||
+ | case $MYSAP_ORASID in | ||
+ | *${SAPSID}*) | ||
+ | # stop the complete SAP system | ||
+ | su - $SIDADM -c "/ | ||
+ | # find the system' | ||
+ | ORASID=" | ||
+ | # stop the database listener | ||
+ | su - $ORASID -c "/ | ||
+ | ;; | ||
+ | *) | ||
+ | # stop the SAP system only | ||
+ | su - $SIDADM -c "/ | ||
+ | ;; | ||
+ | esac | ||
+ | done | ||
+ | rc_status -v | ||
+ | ;; | ||
+ | status) | ||
+ | for SAPSID in $MYSAP_SYSTEMS; | ||
+ | SIDBIG=$(echo $SAPSID | tr /a-z/ /A-Z/) | ||
+ | SAPPROCS=$(ps ax | grep " | ||
+ | ORAPROCS=$(ps ax | grep " | ||
+ | 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 -n " | ||
+ | echo " | ||
+ | done | ||
+ | rc_status -v | ||
+ | ;; | ||
+ | try-restart|restart) | ||
+ | $0 stop | ||
+ | $0 start | ||
+ | ;; | ||
+ | *) | ||
+ | echo " | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | rc_exit | ||
+ | </ | ||
+ | |||
+ | Zum Abschluss noch ein | ||
+ | <code bash> | ||
+ | ln -s / | ||
+ | insserv mysap | ||
+ | </ | ||
+ | und die Sache funktioniert! | ||
+ | |||
+ | Ach ja, die Konfigurationsdatei ''/ | ||
+ | <code bash> | ||
+ | ## Path: Productivity/ | ||
+ | ## Description: | ||
+ | ## Config: | ||
+ | # | ||
+ | # This file defines some parameters. | ||
+ | # | ||
+ | # There are no default values, since they highly depend on the | ||
+ | # individual system. | ||
+ | # | ||
+ | |||
+ | ## Type: string | ||
+ | ## Default: | ||
+ | ## Config: | ||
+ | # | ||
+ | # the SAP systems to be controlled. Multiple systems separated by space. | ||
+ | # for example MYSAP_SYSTEMS=" | ||
+ | # | ||
+ | MYSAP_SYSTEMS=" | ||
+ | |||
+ | ## Type: string | ||
+ | ## Default: | ||
+ | ## Config: | ||
+ | # | ||
+ | # the Oracle databases " | ||
+ | # databases may be given separated by space. On a standalone server, | ||
+ | # MYSAP_ORASID should be the same as MYSAP_SYSTEMS. | ||
+ | # for example MYSAP_SYSTEMS=" | ||
+ | # | ||
+ | MYSAP_ORASID=" | ||
+ | </ | ||
comp/saprc.txt · Zuletzt geändert: 2010-12-09 14:53 von werner