SAP

SAP 7.20 on AIX

Environment

.cshrc / .login

   source $HOME/.sapenv_`hostname`.csh
   source $HOME/.sapenv.csh
   source $HOME/.apoenv_`hostname`.csh
   source $HOME/.lcenv_`hostname`.csh
   source $HOME/.lcenv.csh
   source $HOME/.j2eeenv_`hostname`.csh
   source $HOME/.j2eeenv.csh
   source $HOME/.xienv_`hostname`.csh
   source $HOME/.xienv.csh

Variables

These are typically set for SAP admin user. As you can see, these assume that the DB is Oracle.

$SAP $INST $ORAVER are 'fake' variables used only in this doc.

SAP Profiles

/usr/sap/<sapsystem>/SYS/profile/<sapsystem>_<instance>_<hostname>

Looked up by startsap/stopsap script as:

_PROFILE=${USR_SAP_SID}/SYS/profile/${SAPSYSTEMNAME}_${INST}_${VHOST}

Processes

ps -u $SAP\adm -o comm=,args=

Central instance

Appserver = Dialog instance

startsap/stopsap scripts

/usr/sap/.../.../exe/startsap

/usr/sap/.../.../exe/stopsap # same script

Usage (Old Style): `basename $0` [db|r3|j2ee|ccms|all|check|startupsrv] [<instance>] [<virtual hostname>]"
Example: `basename $0` r3 DVEBGMS00 cic11
Usage (New Style): `basename $0`  [-t | -task <task>]
                             [-i | -instance <instance>]
                             [-v | -vhost "<virtual hostname>[ <virtual hostname>]*"]
                             [-c | -check]
                             [-h | -help]
                             [-r | -rootdir <root dirtory for upgrade>]
                             [-u | -user]   <user for upgrade>
                             [-V | -VERSION]
                             [-C | -checkVHost]
Example: `basename $0` -t r3 -i DVEBGMS00 -v "cic11 cic12"
 Parameters <instance>:
      DVEBMGS??           ABAP Central Instance
      D??                 ABAP Dialog Instance
      ASCS??              ABAP SCS Instance
      SCS??               Java SCS Instance
      J??                 Java Dialog Instance
      JC??                Java Central Instance
      TRX??               TREX Instance
      JMS??               JMS Instance
      ERS??               Enque Replication Service Instance
      SMDA??              Diagnostics Agent Instance
      W??                 Web Services Instance
      G??                 Gateway Instance
      V??                 Virus Scan Server Instance

SAPSYSTEMNAME must be set!

sapcontrol command

sapcontrol

/usr/sap/$SAP/SYS/exe/run/sapcontrol

"Control and monitor SAP instances via WebService interface of SAP Start Service."

Stop sapstartsrv on AIX

- assuming that the SAPadm user has csh shell

su - $SAP\adm
# # this is normally not needed:
# setenv LIBPATH ${LIBPATH}:/usr/sap/$SAP/$INST/exe
sapcontrol -nr 1 -function StopService
# - where '1' is taken from $INST
# - OR
su - $SAP\adm
stopsap startupsrv

saposcol - OS collector

/usr/sap/$SAP/$INST/exe/saposcol

Start: saposcol

Stop: saposcol -k

Status/Version: saposcol -s