Anda di halaman 1dari 65

SAP Basis Training

By: BASIS TEAM


Start SAP Command

Steps to start SAP Service are :


1. Login to <sid>adm user
2. Execute command startsap
all
Shutdown of SAP System
Conditions for Stopping an SAP System
The SAP system may need to be stopped due to maintenance purposes.
These include activities such as :
• Taking an offline database backup
• Upgrading the SAP kernel
• Activation of modified profile parameters
• Upgrade of the SAP instance
• Restarting due to system performance issues

Sequence of Stopping an SAP system


• Stop all Dialog Instances, Stop the Central Instance, Stop the Central Services Instance if it is on a separate
host other than the Central Instance
• Finally , Stop the Database Instance
Sequence of Shutdown
• The SAP System comprises of Database Instance , Central Services and finally the multiple
Dialog Instances
• The sequence of shutdown is extremely important. Stopping the processes out of
sequence will result in an inconsistent state.

STOP SEQUENCE

DIALOG CENTRAL DATABASE


INSTANCE INSTANCE INSTANCE

ABAP Work Message Server


Processes Enqueue
Stopping SAP System on Unix

• Stopping the SAP system using a command call from Unix Command Line
• Log on to the server with the user <sid>adm over a Telnet connection.
• Check whether your SAP system is running at operating system level.
• Enter the command stopsap to stop an instance. To stop the entire SAP system,first stop
the dialog instance and then the central instance.
• The command stopsap only stops the selected instance. If the database is to be stopped,
this must be done using database tools.
Stop SAP Command

Steps to start SAP Service are :


1. Login to <sid>adm user
2. Execute command stopsap
all
SAP Profile Parameter

SAP R/3 systems uses Profiles to define the properties of an SAP R/3 Instance such as the
type and number of work processes, the size of main memory reserved for SAP R/3 and
various parameters like multiple logon, idle time out value etc
There are 2 types of profiles in SAP. They are :

• DEFAULT.PFL (known as System Profile)


• Instance Profile

It is possible to view the current values of SAP profile parameters using transaction RZ10
and RZ11
Location of SAP Profile Files in Unix
These parameters change the system settings. Those parameters can be changing though
RZ10 transaction.
Changing Profile parameters can be done changing the parameters on DEFAULT and
Instance profiles. After complete ring the parameter change the SAP instance should be
restarted. Location of SAP Profile File
UNIX : /sapmnt/<Sys-ID>/profile or /usr/sap/<Sys-ID>/SYS/profile
HANA
ADMINISTRATION
SYLABUS SAP HANA ADMINISTRATION
• START / STOP SAP HANA
• HANA MONITORING
• CHECK DATABASE LOG
• CHECK HANA STATUS

• BACKUP / RESTORE
• CREATE USER
START / STOP SAP HANA
• As the administrator of SAP HANA dataase, you need to stop and/or start
the system for maintenance purpose
• Multiple ways to stop/start HANA Database
Use Hana Studio
 Need the password <sid>adm
Use OS command
 Sapcontrol –nr 00 –function Stop
 Sapcontrol –nr 00 –function Start
 Sapcontrol –nr 00 –function GetProcessList
START / STOP SAP HANA
START / STOP SAP HANA
START / STOP SAP HANA
• Stopping SAP HANA database
Using sapcontrol as root
/usr/sap/hostctrl/exe/sapcontrol –nr <Instance_Number> -function Stop
Using HDB as <sapsid>adm
/usr/sap/<SAPSID>/<Instance_Name>/HDB stop
• Starting SAP HANA database
Using sapcontrol as root
/usr/sap/hostctrl/exe/sapcontrol –nr <Instance_Number> -function Start
Using HDB as <sapsid>adm
/usr/sap/<SAPSID>/<Instance_Name>/HDB start
MONITORING : CHECK LOG
MONITORING : HANA STATUS
MONITORING : STATUS OF SERVICES
BACKUP
• You have to perform backups for SAP HANA database
• Backup are performed while the database is running
• The impact of backup on system performance is negligible, and users can
continue to work normally while the backup is running
• Data Backup
From persistent storage to external backup destinations
Using database function (SAP HANA studio)
• Log Backup
From persistent storage to external backup destinations
• Configuration backup
Manual copy of configuration file to external backup destination
BACKUP
BACKUP
RECOVERY
• To recover the database, you need at least one data backup
• At the beginning of recovery, all data and log backups to be recovered
must be available
• To recover the SAP HANA database, the database needs to be shutdown.
For this reason, during recovery, the database cannot be accessed by end
users or applications
• If recovery failed the completed recovery must be repeated
• The SAP HANA database software version used during the recovery must
always be the same or higher than the version of the software used to
create the backup
RECOVERY
• In general there are three data source involved in the recovery
process :

Data backups stored in the file system


Log backup stored in the file system
RECOVERY
CREATE USER
CREATE USER
CREATE USER
CREATE USER
DEACTIVATE USER
REACTIVATE USER
POLICY USER
POLICY USER
DAILY ACTIVITIES
What is System Monitoring?
System monitoring is a daily routine activity and this document provides a
systematic step by step procedure for Server Monitoring. It gives an
overview of technical aspects and concepts for proactive system
monitoring. Few of them are:
• Checking Application Servers.
• Monitoring System-wide Work Processes.
• Monitoring Work Processes for Individual Instances.
• Monitoring Lock Entries.CPU Utilization
• Monitoring Update Processes.
• Monitoring System Log.
• Buffer Statistics
Why Daily Basic checks / System
Monitoring?
Daily Monitoring Tasks
Daily Monitoring Tasks
• Critical tasks
• SAP System
• Database
Critical Task
No Task Transaction Procedure/Remark
1 Check that SAP system is running (up) Logon onto the SAP System
2 Check that daily backup executed DB12 Check database backup
without errors
Daily Monitoring Tasks
SAP System Task
No Task Transaction Procedure / Remark
1 Check that all application servers are up. SM51 Check that all servers are up.
All work processes with a “running” or a
2 Check work processes (started from SM51). SM50
“waiting” status
Check no work process is running more than
3 Global Work Process overview SM66
1800 second
•Set date to one day ago
Look for any failed updates (update
4 SM13 •Enter * in the user ID
terminates).
•Set to “all” updates Check for lines with “Err.”
•Set date and time to before the last log
review. Check for: Errors
5 Check system log. SM21 •Warnings
•Security messages
•Database problems
Enter an asterisk (*) in User ID.Verify that all
6 Review for canceled jobs. SM37
critical jobs were successful.
Daily Monitoring Tasks
SAP System Task
No Task Transaction Procedure / Remark
7 Check for “old” locks. SM12 Enter an asterisk (*) for the user ID
Review for an unknown or different user ID
8 Check for users on the system. SM04 & AL08 and terminal.This task should be done several
times a day.
Enter an asterisk (*) for Created ByLook for
9 Check for spool problems. SP01 spool jobs that have been “In process” for
over an hour
•Check for: New jobs
10 Check job log SM37
•Incorrect jobs
Look for an excessive number of dumps. Look
11 Review and resolve dumps. ST22
for dumps of an unusual nature.
12 Review buffer statistics. ST02 Look for swaps.
Daily Monitoring Tasks
DatabaseTask

No Task Transaction Procedure / Remark


Review error log for problems. ST04
Database Statistics log DB12 Check database backup log
Monitoring Work Processes for Individual
Instances SM50
Displays all running, waiting, stopped and PRIV processes related to a
particular instance. Under this step we check all the processes; the process
status should always be waiting or running. If any process is having a status
other than waiting or running we need to check that particular process and
report accordingly
Monitoring Work Processes for Individual
Instances SM50
This transaction displays a lot of information like:
• Status of Work process (whether it's occupied or not)
• If the work process is running, you may be able to see the action taken by
it in the Action column.
• You can which table is being worked upon
Monitoring System-wide Work Processes
(SM66)

By checking the work process load using the global work process
overview, we can quickly investigate the potential cause of a system
performance problem.
Monitor the work process load on all active instances across the system
Monitoring System-wide Work Processes
(SM66)
Using the Global Work Process Overview screen, we can see at a glance:
• The status of each application server
• The reason why it is not running
• Whether it has been restarted
• The CPU and request run time
• The user who has logged on and the client that they logged on to
• The report that is running
Monitor Application User (AL08 and SM04)
• This transaction displays all the users of active instances.
Monitoring Update Processes (SM13)
• Update management supports different status for update requests. These
status are displayed in Update Management (transaction code SM13) in
the column Status.
• The status indicates the phase of the update process that the request has
reached, or in which the request has become “stuck”.
• The background of the status field can be green (not yet processed,
currently being processed), yellow (not yet processed, probably “stuck”),
or red (terminated with error). The column Info provides further
information.
Monitoring Update Processes (SM13)
• Execute Transaction SM13 and put '*' in the field USER and click on
button
Monitoring Update Processes (SM13)
• If there are no long pending updates records or no updates are going on
then this queue will be empty as shown in the below screen shot.

But, if the Update is not active then find the below information:
•Is the update active, if not, was it deactivated by the system or by a user?
• Click on button and get the information.
• Click on button and get the below information:
• Is any update cancelled?
• Is there a long queue of pending updates older than 10 minutes?
Monitoring Lock Entries (SM12)
• SAP provides a locking
mechanism to prevent other
users from changing the
record that you are working
on. In some situations, locks
are not released. This could
happen if the users are cut
off i.e. due to network
problem before they are
able to release the lock
• These old locks need to be
cleared or it could prevent
access or changes to the
records
Monitoring System Log (SM21)
We can use the log to
pinpoint and rectify errors
occurring in the system and
its environment.
We check the log for the
previous day with the
following selection/option:
• Enter Date and time.
• Select Radio Button
Problems and Warnings
• Press Reread System Log.
Tune Summary (ST02)
Step 1: Go to ST02 to check
the Tune summary.
Step 2: If you see any red
values, in SWAPS, double –
click the same.
Tune Summary (ST02)

Step 3: In the below screen click on


the tab 'Current Parameters'
Tune Summary (ST02)

Step 4: Note down the value and the Profile parameters


Step 5: Go to RZ10 (to change the Profile parameter values)
Step 6: Save the changes.
Step 7: Restart the server to take the new changes effect.
CPU Utilization (ST06)
CPU Utilization (ST06)
Idle CPU utilization rate must be 60-65%, if it exceeds the value then we
must start checking at least below things:
• Run OS level commands – top and check which processes are taking most
resources.
• Go to SM50 or SM66. Check for any long running jobs or any long update
queries being run.
• Go to SM12 and check lock entries
• Go to SM13 and check Update active status.
• Check for the errors in SM21.
ABAP Dumps (ST22)
ABAP Dumps (ST22)

Double clicking on a row will take you to the


‘Runtime Error Long Text’
ABAP Dumps (ST22)
ABAP Dumps (ST22)
• What Can You Do? : Here you can see some suggestions.

• Error Analysis: This section often provides really detailed information


about the possible causes of the runtime error. This section is really
important and you should go through it to get a head-up about the exact
cause of the error
ABAP Dumps (ST22)
• If you already know
possible causes of the
error, you can find the
solution in the sap note
browser
• Finally if you cannot solve
the problem by yourself,
you can create ticket
message to sap
Spool Request Monitoring (SP01)
• Spool request: A spool request is a document for which a print function
has been selected. However, it has not yet been output to a printer or
another device. The output data for the print document is stored partly
formatted in a data store until an output request is created, that is, until it
is sent to a particular output device.
• The spool system uses a spool request to store the print data temporarily
and to access it. The data is stored in a temporary format. You can also
display the print document.
• The system automatically assigns a 10-digit ID number to a spool request.
Spool Request Monitoring (SP01)
• For spool request monitoring, execute SP01 and select as below:
• Put '*' in the field Created By
• Click on execute button
Spool Request Monitoring (SP01)
• Here we record only those requests which are terminated with problems
Monitoring Background Jobs (SM37)
For Monitoring background jobs,
execute SM37 and select as
below:
• Put '*' in the field User Name
and Job name
• In Job status, select: Scheduled,
Cancelled, Released and
Finished requests
• Choose execute
• Double click every job to check
the log
Database Backup logs (DB12)
From this transaction, we could determine when the last successful backup of the
system was. We can review the previous day's backups and see if everything was fine or
not.
We can also review the redo log files and see whether redo log backup was successful or
not.
DB Performance Monitor (ST04)
DB Performance Monitor
• In a SAP HANA system, ST04 opens Current Status: Overview in DBA Cockpit
THANK YOU

Anda mungkin juga menyukai