Sap Job Starter

18
7/31/2019 Sap Job Starter http://slidepdf.com/reader/full/sap-job-starter 1/18 Enterprise Resource Planning Portal Enterprise Resource Planning Portal Advertise BLO G Google Search  Web ERPGenie.COM ERPGenie Menu  Consultant Corner  Client Corner  ERP Related Menu  Home Vote for us | -1241 ERPGenie.COM -> SAP Technical -> The Home to SAP R3 Basis -> Basis Starter Guide Quick Links  The Home of SAP R-3 ABAP  Basis resumes  SAP Events  Easy Service Marketplace Access - Provides an easy to use interface in to the "difficult to search" SAP Service Marketplace. Ideal for Basis Consultants when searching for patches, download files, ...  Basis Links  Basis Books We are looking for a Basis Guru to help keep this section up to date with useful information. Interested? Supply Chain Management Expertise  Quality SAP Consultants  By: Tim van Steenbergen Contents 1������ SAP R/3...................................................................................................................................................... ............. 2 1.1������� TABLES..........................................................................................................

Transcript of Sap Job Starter

Page 1: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 1/18

EnterpriseResourcePlanning

Portal 

EnterpriseResourcePlanning

Portal 

Advertise | BLOG 

Google Search 

Web  ERPGenie.COM 

ERPGenie Menu 

Consultant Corner 

Client Corner 

ERP Related Menu Home | Vote for

us | -1241

ERPGenie.COM -> SAP Technical -> The Home to SAP R3 Basis -> Basis StarterGuide

Quick Links

  The Home of SAP R-3 ABAP 

  Basis resumes

  SAP Events 

  Easy ServiceMarketplace Access -

Provides an easy to useinterface in to the"difficult to search" SAP

Service Marketplace.

Ideal for BasisConsultants whensearching for patches,

download files, ... 

  Basis Links 

  Basis Books 

We are looking for a Basis Guru to help keep this sectionup to date with useful information. Interested? 

Supply Chain Management Expertise  

Quality SAP Consultants  

By: Tim van Steenbergen 

Contents

1������ SAP

R/3................................................................................................................................................................... 2

1.1������� TABLES..........................................................................................................

Page 2: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 2/18

Page 3: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 3/18

level.............................................................................................................................. 3

1.6.4�������� Userid for

Supportpackages............................................................................................................... 3

1.6.5�������� Userid for

STMS.................................................................................................................................... 3

1.7������� LOGFILES.......................................................................................................

................................................. 3

2������Database..................................................................................................................

........................................... 4

2.1������� GENERALDATABASEKNOWLEDGE...................................................................................................... 4

2.1.1�������� Database-

commands............................................................................................................................ 4

2.1.1.1������ SQL Select-

statements......................................................................................................................... 4

2.1.1.2������

SQL Alter-statements.......................................................................................................................... 4

2.1.1.3������ SQL Other

statements.......................................................................................................................... 4

2.2������� ORACLE..........................................................................................................

................................................. 4

2.2.1�������� important

files....................................................................................................................................... 4

2.2.2�������� OSlevel-

commands............................................................................................................................... 4

2.2.3�������� Brbackup/brrestore....................................................................................

.......................................... 4

Page 4: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 4/18

2.3������� MS

SQL............................................................................................................................................................ 4

2.3.1�������� Stored

procedures................................................................................................................................ 5

2.4������� DB

2/400........................................................................................................................................................... 5

3������Operating

system......................................................................................................................................... 6

3.1������� GENERAL........................................................................................................................................................ 6

3.1.1�������� ftp..............................................................................................................

............................................... 6

3.1.2�������� General

commands............................................................................................................................... 6

3.2������� UNIX................................................................................................................

................................................. 6

3.2.1�������� Simple

commands................................................................................................................................. 6

3.2.2�������� A little more complex

commands....................................................................................................... 6

3.3������� NT....................................................................................................................

................................................. 6

4������General

issues.................................................................................................................................................8

4.1������� SAP

Page 5: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 5/18

TOOLS..................................................................................................................................................... 8

4.1.1�������� dbmon.......................................................................................................

.............................................. 8

4.1.2�������� gwmon.......................................................................................................

.............................................. 8

4.1.3�������� R3load.......................................................................................................

............................................. 8

4.1.4�������� R3setup.....................................................................................................

.............................................. 8

4.1.5�������� R3trans......................................................................................................

............................................. 8

4.1.6�������� sapdba, to be run as

ora<SID>......................................................................................................... 8

4.1.7�������� saplicense, to be run from the ..\exe\run

directory......................................................................... 8

4.1.8�������� saprouter....................................................................................................

............................................ 8

4.1.9�������� tp, to be run from the

usr\sap\trans\bin............................................................................................ 8

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 status of statistics-information per SAP-table

Page 6: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 6/18

E070 Change-requests and their tasks and propertiesE071 Objects in change-requestsKNA1 Necessary at sapscript-ABAP�s

MARA MateriallistPAT01,

PAT03

Supportpackages and their status, also see table TEPSIN

TBATG Holds runtime-transportinformation (don�t know yet what it exactly

holds)TBTCO BatchjobinformationTTZZ Timezones.USR01 ~...12

Userdata

1.2  Transactions

Good advise: don�t 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 SystemlogSM37 Check the batchjobsSM50/51 Show all processes on one server / all serversSM66 Show all active process on the systemST11 Display developer-traces

ST22 ABAP-dumps

1.2.2  ABAP-related

SE11 ABAP dictionarySE16/SM30 Data browser/Table editor (3.1x�s SM31 is replaced by SM30)

SE37 Function builder

SE38 ABAP editorSE41 Menu painterSE51 Screen painter

1.2.3  Backgroundjob-related

RZ04 Operation modesSM36 Create background jobSM37 Show background jobsSM63 Operation mode calendarSM65 Check backgroundjob-settings

Page 7: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 7/18

1.2.4  Generally useful

AL11 SAP directoriesDB02 Database performance: Tables and Indexes

PFCG Profile generatorRZ10 Profile maintenanceSARA ArchivingSCC4 Client change optionsSE01 Transport organizer, use SE09 for ABAP-transports, SE10 for

customizing transportsSE06 (4.xup)

System change options, see SCC4 for Client change options.

SE71 Maintain Layout-sets also known as sapscriptsSM02 System messageSMGW Gateway administration

SMLG Define logon-groupsSMLT Language administrationSPAM Support Package ManagerSPAU ABAP-dictionary assistant during supportpackage-importSPDD Data-dictionary assistant during supportpackage-importSTFK Search the customersystem that have an open connection to Walldorf 

1.2.5  Functional transactions

MM01,2,3 Create, Modify, Display material data

PP01,2,3 Create, Modify, Display productionplant data

VA01,2,3 Create, Modify, Display sales order data

1.3  Commands

 /$sync Synchronise the buffers. ABAP�s on the application servers will be

refreshed, so possibly changed. Not recommended on productionsystemsin use.

 /h Turning on the debugging mode

 /n New command

 /o New session

1.4  ABAP reports

RDDIMPDP Jobtriggerer. Starts the released batchjobs and tp-commands.

RDDNEWPP To schedule RDDIMPDP, run this as DDIC in each targetclient

RMMMPERI Periodclosing for MM. Gives problems regularly.

RSCOLL00 Collector for system- and databasedata. Usually runs every hour.

Page 8: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 8/18

RSDBTIME Check and repair inconsistencies in the clocks of a system

RSEPSUPL Upload the patches available in /eps/in 31x

?RSSUPC?? Generates the profiles and activitygroups

RSPARAM Shows the parametersettings of a running SAP-instance

RSPO1041 Delete old spoolrequests. This abap used to be RSPO0041 in older

releasesRSTPTEST Tests the transporttool

RSUSRxxx User related reports (000 list active users, 002 userby comlex criteria, etc)

TOUCHALL Generate all ABAP�s. Takes about 24 hours!

1.5  Profileparameters

rdisp/* gui-parameters

rdisp/gui_max_wait maximum time of no response (in 3.x: rdisp/gui_auto_logout)

1.6  Userids

1.6.1  Userids on SAP R/3 level

SAP*��������������� Sapsuperuser, has all authorizations. Its default

password is available in the OSS.

DDIC��������������� Its default password is available in the OSS.

CPIC���������������� eh

1.6.2  Userids on databaselevel

SAPR3������������ User that connect SAP R/3 to the Oracle (or SQL or ..)

database

OPS$��������������� Oracle-only. Used to change passwords of OS-level

userid�s. see OSS-note 50088

1.6.3  Userids on OS-level

<SID>adm������������������ os-administrator for unix-activities as

creating logical volumes, filegroups, smit, smitty, etc

ora<SID>�������������������� Oracle only: R/3-database

Page 9: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 9/18

administrator for SAPDBA-activities as brarchive, sapdba-analyze, brrestore,etc.

SAPService<SID>����� NT-only: OS-user used for running the service SAPOSCOL

1.6.4  Userid for applying Supportpackages

During applying supportpackages (aka. hotpackages) you need to be logged on to client 000 witha userid other then SAP*, but with the same authorizations.

1.6.5  Userid for configuring and maintaining STMS

During changing the Transport Management System using STMS you need to be logged on asTMSADM in client 000 on the transportdomaincontroller.

1.7  LogfilesSAP logs almost any action and has a lot of trace-options. Here is a short listing for them:

  systemlog, viewed via transaction SM21, file stored in /work 

  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

  startuplog, viewed via ST11

  stderrx, viewed via ST11, 3 or 4 files, hold more errorstatements

  trans.log, viewed via AL11, DIR_TRANS, transportlogfile

1.8  Traces

Tracefiles are very useful when analysing a problem.

  ST05 (System, Utilities, Performance trace) allows you to set a trace per user, transaction,program or process-id.

Page 10: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 10/18

  SM50. Here you see the processes. Per proces you can see it�s 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  Database

2.1  General databaseknowledge

Logging on to the database is done via:

  Log on as ora<SID>

  UNIX: svrmgrl (in Oracle 7.* this used to be �sqlplus�)

  NT: sqldba72 (or svrmgr23, svrmgr30)

  connect internal

2.1.1  Database-commands

2.1.1.1  SQL Select-statements

Select * from  useful fields  what does it do? dba_roles;

dba_tables where tablespace_name=

�SYSTEM� and

owner=�SYS�;

shows all systemtables

sys.dba_role_privs; where grantee like

�OPS$�;

show the roles of the OPS$-user,should be: CONNECT, RESOURCEand SAPDBA.

v$backup shows which files are in backup mode

v$datafile; to verify the correct execution

v$datafile where status not in('SYSTEM','ONLINE')

should be empty if SAP is online

v$dba_rollback_segs Data of all rollback segmentsv$log; shows all logfiles (4) and which is

active

v$logfile; shows all physical logfiles (mirrored,so: 8)

v$nls_parameters where parameter ='NLS_CHARACTERSET';

returns the characterset with which thedatabase is installed

Page 11: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 11/18

v$recover_file; should be empty if SAP is online

v$rollname Name and number of all ONLINErollback 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

alter database

open;���������������������������������  ���

��������� 

?alter database rename file '<device>:\<old path>\<old filename>' to '<device>:\<newpath>\<new filename>';

alter system switch logfile; (4 times to perform four logswitches)

alter tablespace <tablespacename> end backup; the tablespace will end its status of being backedup.

2.1.1.3  SQL Other statements

analyze table <tablename> validate structure cascade;

drop tablename from ??; deletes the table from the database.

exit;�������� logging out

grant user1 to user2; copies the rights of user1 to user2

saposcol�v��������� show the version of saposcol

2.2  Oracle

2.2.1  important files

init<SID>.ora

init<SID>.sap

Page 12: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 12/18

init<SID>.dba

2.2.2  OSlevel-commands

exit��������� logging out

lsnrctl start����������� start the oracle listener

lsnrctl status�������� shows the status of the listener

tnsping <SID>����� tests the TNS-connection to the database

smit (or smitty)���� characterbased menu for handling of filesystems, logical volumes,

drives etc.

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

Logging on to the database is done via:

  Log on as <SID>adm?

  svrmgr30 or svrmgr (as of oracle 8.0)

  connect internal

checkdb to be added (or see microsoft/sql/ knowledgebase)

2.3.1  Services

SAP-Services that needs to be running on OS-level

  SAP<SID>_<Instance-number>

  SAPoscol

Page 13: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 13/18

2.3.2  Stored procedures

sp_helpsort show the SQL-server�s sortorder and characterset (thus the codepage)

2.4  DB 2/400enddbmon stop the databasecollector-program when it is running

3  Operating system

3.1  General

3.1.1  ftp

bin set transferring files to binary (as opposed to ascii)

get download a file (mget doe not work on SAPSERVx)

ls�l list directory, -l to show filedetails

put upload a file (mput does not work on SAPSERVx)

pwd show current path

3.1.2  General commands

startsap� r3 <SID>

<profile>

Start SAP from the commandprompt

stopsap <SID> Stop SAP from the commandprompt

tp connect <SID> Tests if you can connect to the database of the system (start inusr/sap/trans)

r3trans�d�v Tests if you can connect to the database

r3trans�l filename Checks if the file is consistent and correct and can be imported

3.2  UNIX

3.2.1  Simple commands

chgrp grpfilelist

Change the group that the file(s) belong to.

chmod 777filelist

Change the rights of the file(s). 777: owner-world-user. 7: read-write-delete (=111)

chown userfilelist

Change the owner of the file(s)

Page 14: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 14/18

cp file1 file2 Copy file1 to file2

cp /dev/nullfile

Clear all contents of file

errpt Hardware error-report (IBM-unix)

ls�ltr <dir> Show filelist,�parameters: l: show fileattributes , t: sort by time, r:

reverse sortordermore <dir>

mv file1 file2 Move command

ps�ef  Show all running processes, -e, -f 

vi The famous vi-editor

3.2.2  A little more complex commands

kill <PID> Kill a process as if it is cancelled. Child processes are killed as well.

kill�1 <PID> Kill a process as if the user is logging out. Child processes are killed as

well.

kill�9 <PID> Kill a process as brutal as possible. Child-processes are not touched.

kill�USR2

<PID>

Increases TRACE by 1

kill�USR1

<PID>

Decreases TRACE by 1. When TRACE = 0 all open trace files are

closed and can be cleared using�cp /dev/null filename�.

lslv Show the logical volumes

lsvg Show the volumegroups

sappfpar check 

pf=<profile>

Checks the profileparameter. Do they exist and do they have correct

values.set VAR VAL set environment variable VAR to value VAL

printenv prints the environementvariables

ps�ef |grep

xxx

Monitor processes with name containing xxx

ps�u

<username>

Monitor processes run by user <username>

Crontab

To schedule tasks you have to edit file crontab. Every line starts with five numbers and then acommand. The numbers stand for minute, hour, day-of-month, month-of-year, day of week (0 forsunday).

The easiest way to edit the crontab file with a text-editor.

Detailed UNIX-commandlist

Page 15: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 15/18

To get detailed information about every UNIX-command available and lots of articles, see site

AIX: www.rs6000.ibm.com/cgi-bin/ds_rslt 

3.3  NT

at Schedule anything.

hostname Shows the hostname

ipconfig /all Show all ip-addresses of the system

ipcs�m Show all IPC-processes

ipcrm�m

<process>

Kill ipc-process <process>

regedit / regedt32

Edit the registry. (for instance HKLM, software, SAP)

sapntchk Checks the system, its ip-adresses, running processes etc.

ntenv2reg Copy the environmentsettings to the registry to secure them

ntreg2env Copy the registry to the environmentsettings

4  General issues

4.1  SAP Tools

4.1.1  dpmon

This tool allows you to check SAP�s 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 Start dpmon, type m for the menu

4.1.2  gwmon

This tool allows you to check if the gateway is running. It is an addition to transaction SMGW.

4.1.3  R3load

R3load is used to:

-  import/export databases

4.1.4  R3setup

Page 16: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 16/18

R3setup is used to:

-  install SAP-databases

-  import exported databases into existing databases

4.1.5  R3trans

R3trans is used to:

-  test databaseconnections

-  import the transports

r3trans�d-v Tests the connection to the database

r3trans�l <filename>Tests if the datafileis corrupt or not

4.1.6  sapdba, to be run as ora<SID>

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 Gathers the optimizerdata that needs to be updated

sapdba�check <parameters> Checks the objects that you specify with itsparameters

sapdba�checkopt PSAP% Checks which optimizerdata needs to be updated

sapdba�statistics Does all of the above in one run. See note 184513

4.1.7  saplicense, to be run from the ..\exe\run directory

saplicense�test

pf=../../profile/default.pfl

Tests if the license is still valid

saplicense�get Gets the customer key (aka hardwarekey) need forthe license

saplicense�install To install the licensekey received from SAP

saplicense�show Shows the current license

Request the license for the system by sending the fax included in the installation-kit to SAP.

Page 17: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 17/18

4.1.8  saprouter

saprouter�r�R <saprouterfile>

profile

Start the saprouter.

Table saprouttab p * * *(Permit/Deny, From-ip, To-ip, Service)

4.1.9  tp, to be run from the usr\sap\trans\bin

As of version 4.0 there is no more need for us to go down to the os-level. Everything can be donewith transaction STMS. Nevertheless the tp-commands are still be useful and needed in somecases (yet). for detailed information on tp-command, see OSS-note 309711.

tp connect <SID> Tests the connection to <SID>

tp locksys <SID> Lock the SAP-system for all users except SAP*

tp unlocksys <SID> Unlock the SAP-system, giving access to all users

tp showbuffer <SID> Show the buffertp addtobuffer<changerequest><SID>

Add the changerequest to the buffer. possible par.:u1

tp delfrombuffer<changerequest><SID>

Delete the changerequest from the buffer

tp import <changerequest> <SID>u.x

Importcommand, parameter u:u1: Import regardless if it is already imported or notu2: Overwrite the originals.u6: Overwrite objects in unconfirmed repairs.u8: Overwrite objects in open repairs

The returncodes for tp import command:

4�������������Warning

8�������������Error.

12/14/16 Fatal error

152  Nothing done

>1000����� 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 tp-parameter-settings

Page 18: Sap Job Starter

7/31/2019 Sap Job Starter

http://slidepdf.com/reader/full/sap-job-starter 18/18

filesplit=yes|true|on(default=no)

Export will be split into files of size 2147483647 (2GB-1). Useful

for OS�s that can not handle files larger then 2GB.

Contact Us | Polls | Add URL | Contribute | About | Privacy | Terms | Feedback | Help! Message Board | Discussion Forum | BLOG | Consultants: Post your resume | Companies: Advertise on

ERPGenie.COM | Post Job � ERPGenie.COM, Inc. All rights reserved. 

All product names are trademarks of their respective companies. ERPGenie.COM, Inc. is in no way affiliated with SAP AG.SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver, and and any other SAP trademarks are registered trademarks

of SAP AG in Germany and in several other countries. Every effort is made to ensure content integrity. Use information on this site at your own risk.