1.1.1
Central
saposcol
Database Instance
If not started If not started
SAP AG 1999
The operating system user logs on to the UNIX operating system as user <sid>adm.
To start R/3, run the shell script startsap_<host>_<instance_no> from the home directory of user
<sid>adm. The script startsap_<host>_<instance no> has the alias startsap.
startsap starts the saposcol process, which is the statistics collector for operating system resource data, if
it is not yet running.
startsap calls the script startdb, which starts the database if it is not already started.
startsap then starts the central instance.
The R/3 System administrator can start additional instances and application servers. To start the instances
independently of the database, use the script startsap.
startsap has the following options:
startsap r3: Checks if the database is running; if it is, only the instance is started
startsap db: Starts only the database
startsap all: Default entry; starts both the database and the R/3 instance
1.1.2
sapstart
Processes SE CO MS Disp+work
Services WP … WP gwrd
Connection
Database
SAP AG 1999
1.2.1
$HOME/<sid>adm/startsap_<host>_<instance no.>
$HOME/<sid>adm/startsap_<host>_<instance no.>.log
/sapmnt/<SID>/<Instance><No>/work/ ...
Time dev_w0 … n
Trace files of the work processes
SAP AG 1999
The R/3 startup scripts log their actions to log files in the home directory of the user <sid>adm.
R/3 work directories contains trace files and error files for messages relating to the startup of work
processes. There is a work directory for each R/3 instance. The work directory contains information that
may not be found in the R/3 System log.
The work directory files are initialized in chronological order.
To define the level of information written to the trace files, set the profile parameter rdisp/TRACE in the
instance profile. The values for this parameter are:
0: Write only errors (no traces)
1: Write error messages and warnings (default)
2: Write error messages and a short trace
3: Write error messages and the complete trace
These files can be viewed at OS level or in R/3:
At OS level, you can use UNIX command ‘page’, ‘more’, or ‘cat’.
In R/3, you can use transaction AL11.
In R/3, you can use transaction SM50 to see the developer trace for a particular work process: choose
Process Trace Display file (or click on Display file).
1.3 Processes after starting SAP Instance
The process IDs of the various R/3 processes clearly show the R/3 startup procedure.
sapstart creates the dispatcher, collector, and sender.
saposcol is started directly from the script startsap.
The UNIX init process has the process ID 1.
Transaktion: Beschreibung:
SM21 Dient der Untersuchung und der Anzeige der System Logs
D Dialog-Prozess
V Update Prozess
E Enqueue Prozess
B Batch Prozess
S Spool Prozess
In case that a startup is not possible you have to analyse TRACE-Files located under:
/usr/sap/<SID>/DVEBMGS00/work
Check that /etc/services has read-permission for <SID>adm and ora<SID>
If startup is not possible due to a database error, try to start the database manualy as followed:
logon as ora<sid>
sqldba lmode=y
SQLDBA> connect internal
SQLDBA> startup
Login as <SID>adm. Backup the active instance profile, e.g instance P01
$ cd /usr/sap/P01/SYS/profile
$ cp P01_DVEBMGS00 P01_DVEBMGS00.orig
2. Create the new instance profile. The new profile must minimum contain the following parameter:
Parameter: Wert:
SAPSYSTEMNAME = P01
SAPSYSTEM = 00
rdisp/TRACE =2
rdisp/wp_no_dia =2
3. start SAP R/3 system and check the trace files under
/usr/sap/<SID>/DVEBMGS00/work/
ATTENTION: Please don’t forget to reset the trace-level rdisp/TRACE. Normaly this
parameter is not set and so the default is 1.
With trace level 2 and higher you got a lot of MB’s and can running out of space.
Das setzen des Parameters rdisp/TRACE auf 2 erhöht den Trace-Level und sorgt dafür, das die Trace-Files
unter /usr/sap/<SID>/DVEBMGS00/work/ signifikant mehr Informationen enthalten. Der Parameter
rdisp/wp_no_dia sorgt dafür, das nur 2 Workprozesse hochgefahren werden und damit das System nicht
so hoch belastet wird.
ACHTUNG: Das Heruntersetzen des TRACE-Levels sollte NIE vergessen werden.
Voreingestellt ist der Parameter rdisp/TRACE in dem Instanz-Profil gar nicht
eingetragen. Das System nimmt dann automatisch den TRACE-Level 1 an. Mit
dem TRACE-Level 2 werden sehr schnell TRACE-Files von mehreren hundert
MB geschrieben.
1.3.3 SAP Entwickler Traces
File: Beschreibung:
rdisp/TRACE =1 ( Grundeinstellung)
Wert: Bedeutung:
0 Kein TRACE
1 Nur Fehlermeldungen
2 Voller TRACE
Zur Auswertung der TRACE-Dateien bei einem Fehler, kann folgendes Vorgehen helfen:
# ll -t
TCode: Beschreibung:
/nxxxx Terminates current transaction and starts transaction "xxxx"
/n Terminates current transaction /nend Terminates all separate sessions and logs
off
/nex Terminates all separate sessions and logs off immediately
/oxxxx Opens a new sessions and starts transaction "xxxx" inn new session
/o Lists existing sessions and allows deletion or opening of a new session
/h Switches into debugging mode
/hs Switches into debugging mode and activates the debugging of system functions
/$SYNC Buffer Command: Resets all buffers in the system
/$CUA Buffer Command: Resets the CUA buffer of the application server
/$TAB Buffer Command: Resets the table buffer of the application server
/$NAM Buffer Command: Resets the nametab buffer of the application server
/$DYNP Buffer Command: Resets the screen buffer if the application server
/bdel Deletes the current batch input transaction
/bend Terminates batch unput processing and sets the sessions to "Failed"
TCode: Beschreibung:
%sc FIND if find is not an option in an SAP screen
%pc SAVE it to a file on your pc
%pri/%prin Will print the current screen
%bc1 Takes you back one screen (Green Arrow)
%bc2 Cancel (Red X)
%bck Yellow Arrow
Ein Screendump vom einem SAP Bildschirm kann mit der Tastenkombination:
AltGr/Druck
erzeugt werden. Innerhalb eines Microsoft Dokumentes wie Word oder Power Point kann es dann wie
gewohnt mit der Kombination:
STRG-V
eingefügt werden.
1.4.1 R/3 Start-Profile
Beim Starten des SAP R/3 Systems werden eine Reihe von Profilen eingelesen. Nachfolgend eine
Übersicht über die Verteilung der verschiedenen Profile im Filesystem:
gui exe profile global Informationen über alle, von log data work
Prozessen dieser Instanz er-
zeugten syslog-Einträge
2. Die nächste Priorität haben die Instanz-Profile mit ihren Parametern, Beispielsweise in
C11_DVEBMGS00_hpcc024
3. Das nächste Profile, das beim Starten immer gelesen wird, ist das zentrale Systemprofile
DEFAULT.PFL
4. Die niedrigste Priorität haben Parameter, die in den C-Sourcen fest vorbelegt wurden
Oracle - Oracle Directory Structure in R/3
SAP AG 1999
Directory and file names are standardized in the R/3 environment. We recommend that you use the
following standards:
Tablespace files reside in the sapdata<n> directories
The online redo log files reside in the origlog and mirrlog directories
The offline redo log files are written to the saparch directory
There should be at least 3 copies of the Oracle control file on different disks
The profile init<SID>.ora configures the Oracle instance, and resides in directory dbs
(NT: database)
The profile init<SID>.sap configures the backup tools brbackup and brarchive, and resides in
directory dbs (NT: database)
The profile init<SID>.dba configures the SAPDBA tool, and resides in directory dbs
(NT: database)
The Oracle alert file is written to directory saptrace/background
Trace files of the Oracle shadow processes are written to the directory saptrace/usertrace
During reorganization, export datasets are written to directory sapreorg
The directories saparch, sapcheck, sapreorg, and sapbackup are used by the SAP database tools.
1.4.2
CPU time
Network
Network
Wait Roll Load Processing time Database time
time in time
Response time
Presentation
Server Application Server Database Server
SAP AG 1999
To access the Workload Monitor, use Transaction code ST03N. or, from the R/3 initial screen, choose
ToolsAdministration MonitorPerformanceWorkload Analysis. Choose Performance
database and make the selections required by the dialog boxes. The Performance: Workload Overview
for Server is displayed.
In the “Administrator’s Mode” that is chosen by default the time frame of the workload analysis is the
current day.
Important for this training:
Change to “Expert Mode”. Choose under “Detailed Analysis” -> “Last minutes load”
During a workload exercise, restrict the time period to the time when the exercise is running.
Under Analysis views, you can access, for example:
Workload overview - Workload statistics according to work process type
Transaction Profile - Workload statistics according to transaction.
Time Profile - Workload statistics according to hour
1.4.4
Problem symptoms:
Check:
Yes Large database
All Workload request times
transactions on all servers
affected? (Cont.)
SAP AG 1999
If a problem is detected, the data in the Workload Monitor (Transaction ST03N) can be used as follows to
identify the area of the system where the problem is located.
First check for general performance problems affecting all transactions. Good general performance is
normally indicated by:
Wait time < 10% response time
Main menu (choose Transaction Profile) < 100 ms
In the Workload Monitor, the following values normally indicate good performance:
Average roll-in time < 20 ms
Average roll wait time < 200 ms
Average load (and generation) time < 10 % of response time (<50 ms)
Average database request time < 40 % of (response time - wait time)
Average CPU time < 40 % of (response time - wait time)
Average CPU time Not much less than processing time
Average response time - Depends on customer requirements – there is no general rule
1.4.5
Large load time Program buffer, CUA buffer, or screen buffer too small
SAP AG 1999
These are some of the more common problems indicated by Workload Monitor statistics.