Professional Documents
Culture Documents
Starter
Guide
User Rating:
/1
PoorBest
Written by Tim van Steenbergen
Monday, 02 July 2007
1
SAP R/3
This document is created to get a comprehensive list of all actions that I have taken
during the maintenance of the SAP. This to make sure that I forget as little as possible.
This document can be a good handle for basis consultants who are starting on the job.
1.1
Tables
DBSTATC
E070
E071
KNA1
MARA
PAT01,
PAT03
TBATG
TBTCO
TTZZ
USR01
~ ...12
1.2
Transactions
Good advise: dont learn the transactioncodes by heart at first, but use the menu-paths.
This way you will sooner get an overview of the systems possibilities.
1.2.1
Daily maintenance
SM21
SM37
SM50/51
SM66
ST11
ST22
1.2.2
Systemlog
Check the batchjobs
Show all processes on one server / all servers
Show all active process on the system
Display developer-traces
ABAP-dumps
ABAP-related
SE11
SE16/SM30
SE37
ABAP dictionary
Data browser/Table editor (3.1xs SM31 is replaced by SM30)
Function builder
SE38
SE41
SE51
1.2.3
ABAP editor
Menu painter
Screen painter
Backgroundjob-related
RZ04
SM36
SM37
SM63
SM65
1.2.4
Operation modes
Create background job
Show background jobs
Operation mode calendar
Check backgroundjob-settings
Generally useful
AL11
DB02
PFCG
RZ10
SARA
SCC4
SE01
SE06 (4.x
up)
SE71
SM02
SMGW
SMLG
SMLT
SPAM
SPAU
SPDD
STFK
1.2.5
/$sync
/h
/n
/o
Functional transactions
MM01,2,3
PP01,2,3
VA01,2,3
1.3
SAP directories
Database performance: Tables and Indexes
Profile generator
Profile maintenance
Archiving
Client change options
Transport organizer, use SE09 for ABAP-transports, SE10 for
customizing transports
System change options, see SCC4 for Client change options.
Commands
Synchronise the buffers. ABAPs on the application servers will be
refreshed, so possibly changed. Not recommended on
productionsystems in use.
Turning on the debugging mode
New command
New session
1.4
ABAP reports
RDDIMPDP
RDDNEWPP
RMMMPERI
RSCOLL00
RSDBTIME
RSEPSUPL
?RSSUPC??
RSPARAM
RSPO1041
Profileparameters
rdisp/*
gui-parameters
rdisp/gui_max_wait maximum time of no response (in 3.x: rdisp/gui_auto_logout)
1.6
1.6.1
Userids
Userids on SAP R/3 level
SAP*
in the OSS.
DDIC
CPIC
eh
1.6.2
Userids on databaselevel
SAPR3
User that connect SAP R/3 to the Oracle (or SQL or ..) database
OPS$
note 50088
1.6.3
Userids on OS-level
<SID>adm
ora<SID>
SAPService<SID>
1.6.4
During changing the Transport Management System using STMS you need to be
logged on as TMSADM in client 000 on the transportdomaincontroller.
1.7
Logfiles
SAP logs almost any action and has a lot of trace-options. Here is a short listing for
them:
developertraces, viewed via ST11 or SM50 and doubleclick the process (as of
4.x), stored in /work
dev_wX
log for workproces number X
dev_ms
log for workproces for the messageservice
dev_gw
log for workproces for the gateway
dev_disp
log for workproces for the dispatcher
dev_tp
log for workproces for the transports
1.8
Traces
ST05 (System, Utilities, Performance trace) allows you to set a trace per user,
transaction, program or process-id.
SM50. Here you see the processes. Per proces you can see its corresponding
tracefile via button Show file. The default trace-level is 1. You can change the
tracelevel via Process, Trace, Dispatcher, Change tracelevel (of all processes, not
per process).
2
2.1
Database
General databaseknowledge
Log on as ora<SID>
connect internal
2.1.1
2.1.1.1
Database-commands
SQL Select-statements
Select * from
dba_roles;
dba_tables
useful fields
where tablespace_name=
shows all systemtables
SYSTEM and
owner=SYS;
sys.dba_role_privs; where grantee like OPS$; show the roles of the OPS$-user,
should be: CONNECT,
RESOURCE and SAPDBA.
v$backup
shows which files are in backup
mode
v$datafile;
to verify the correct execution
v$datafile
where status not in
should be empty if SAP is online
('SYSTEM','ONLINE')
v$dba_rollback_segs
Data of all rollback segments
v$log;
shows all logfiles (4) and which
is active
v$logfile;
shows all physical logfiles
(mirrored, so: 8)
v$nls_parameters
where parameter =
returns the characterset with
'NLS_CHARACTERSET'; which the database is installed
v$recover_file;
should be empty if SAP is online
v$rollname
Name and number of all
ONLINE rollback segments
v$rollstat
Number, status, optimal size,
diff. capacity sizes etc. of all
ONLINE rollback segments
The V$-files contain the dynamic performance tables which hold the runtime
information of R/3. To see all V$-files listed, go to ST04, detailed analysis, button
display V$ values.
2.1.1.2
SQL Alter-statements
logging out
Oracle
important files
init<SID>.ora
init<SID>.sap
init<SID>.dba
2.2.2
OSlevel-commands
exit
logging out
lsnrctl start
lsnrctl status
tnsping <SID>
2.2.3
Brbackup/brrestore
BRRESTORE m file01/dir01 .. filen/dirn restore the backup and places the files in
the given directories instead of the original directories
2.3
MS SQL
Log on as <SID>adm?
connect internal
Services
SAP<SID>_<Instance-number>
SAPoscol
2.3.2
Stored procedures
sp_helpsort
2.4
DB 2/400
enddbmon
3
3.1
3.1.1
bin
get
ls l
put
pwd
3.1.2
Operating system
General
ftp
set transferring files to binary (as opposed to ascii)
download a file (mget doe not work on SAPSERVx)
list directory, -l to show filedetails
upload a file (mput does not work on SAPSERVx)
show current path
General commands
startsap r3 <SID>
<profile>
stopsap <SID>
tp connect <SID>
r3trans d v
r3trans l filename
3.2
3.2.1
UNIX
Simple commands
chgrp grp
filelist
chmod 777
filelist
chown user
filelist
cp file1 file2
cp /dev/null
file
errpt
ls ltr <dir>
more <dir>
mv file1 file2
ps ef
vi
3.2.2
kill <PID>
kill 1 <PID>
kill 9 <PID>
kill USR2
<PID>
kill USR1
<PID>
lslv
lsvg
sappfpar check
pf=<profile>
set VAR VAL
printenv
ps ef |grep
xxx
ps u
<username>
Crontab
To schedule tasks you have to edit file crontab. Every line starts with five numbers and
then a command. The numbers stand for minute, hour, day-of-month, month-of-year,
day of week (0 for sunday).
NT
at
hostname
ipconfig /all
ipcs m
ipcrm m
<process>
regedit /
regedt32
sapntchk
ntenv2reg
ntreg2env
4
Schedule anything.
Shows the hostname
Show all ip-addresses of the system
Show all IPC-processes
Kill ipc-process <process>
Edit the registry. (for instance HKLM, software, SAP)
Checks the system, its ip-adresses, running processes etc.
Copy the environmentsettings to the registry to secure them
Copy the registry to the environmentsettings
General issues
4.1
SAP Tools
4.1.1
dpmon
This tool allows you to check SAPs processes and to find out which one is killing the
performance. Especially useful when it is not possible anymore to log on to your
system.
(Oracle: use <SID>adm to start this tool)
dpmon
4.1.2
This tool allows you to check if the gateway is running. It is an addition to transaction
SMGW.
4.1.3
R3load
import/export databases
4.1.4
R3setup
install SAP-databases
4.1.5
R3trans
test databaseconnections
4.1.6
Sapdba is run to collect the data for the optimizer. This is done in two steps: First
SAPDBA checkopt PSAP% checks which optimizerdata needs to be updated, then
SAPDBA analyze DBSTATCO gathers the data of the objects to be updated.
sapdba analyze DBSTATCO
sapdba check <parameters>
sapdba checkopt PSAP%
sapdba statistics
4.1.7
saplicense test
pf=../../profile/default.pfl
saplicense get
saplicense install
saplicense show
Request the license for the system by sending the fax included in the installation-kit to
SAP.
4.1.8
saprouter
saprouter r R <saprouterfile>
profile
Table saprouttab
4.1.9
As of version 4.0 there is no more need for us to go down to the os-level. Everything
can be done with transaction STMS. Nevertheless the tp-commands are still be useful
and needed in some cases (yet). for detailed information on tp-command, see OSSnote 309711.
tp connect <SID>
tp locksys <SID>
tp unlocksys <SID>
tp showbuffer <SID>
tp
addtobuffer
<changerequest><SID>
tp
delfrombuffer
<changerequest><SID>
tp
import
<changerequest>
<SID> u.x
Warning
Error.
Nothing done
Returncode with extra information, but only the last three digits are relevant
The file TP_<DOMAIN>.PFL (used to be TPPARAM) in this directory holds the tpparameter-settings
filesplit=yes|true|on Export will be split into files of size 2147483647 (2GB-1).
(default=no)
Useful for OSs that can not handle files larger then 2GB.