Starting and Stoping Sap System

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

Starting and Stopping the SAP Windows &

HANA System
SAP Windows
SAP systems comprise three layers: the operating system layer, database layer, and application layer. The
individual layers build on one another in this sequence. As a result, the individual components must be started
in exactly the same sequence because each layer can only run if the underlying layer is active.
The operating system layer provides a basis for the database and application layers, and it runs on a server-
this can involve a physical or virtual server. The database and SAP system are installed on this server, or, if
necessary, the database and application can also be operated on two separate servers. The server and operating
system must be running for you to start the database and application. The operating system manages the
hardware resources of the server, and makes it available to the running applications. This book doesn't cover
the individual steps involved in the startup and shutdown of a server or of the installed operating system. If
necessary, refer to the documentation provided by your operating system or hardware manufacturer.
All SAP system data is stored in the database. This includes the application data (e.g., POs, invoices, etc.)
generated by daily transactions, as well as the system settings (Customizing) and the source code of programs,
functions modules, and so on. The database must be active if you want to start an SAP application because this
is the only way to ensure that the application can access the data. Chapter 8 describes how to start and stop the
database.
Steps to Follow When Stopping the System
If you stop the database without stopping the SAP system first, the application can't save buffered data
that hasn't yet been stored. In this case, data loss is inevitable. The same also applies if you shut down
the operating system or server without closing the SAP system and database properly. The application
and database buffers can't be emptied, and the buffered data can't be saved.
You can only start the SAP application itself if the operating system and database are already running. While it's
running, the application accesses the information stored in the database. To stop an SAP system, it's necessary
to repeat the same steps in exactly the reverse order. You stop the SAP system before stopping the database.
The operating system and the physical or virtual server can then be shut down.

Starting the SAP Windows System


Follow these steps to start the SAP system:

1. Start the server and the operating system. Check the operating system log to determine whether the start has
been successful.

2. Start the database. Check the database log to determine whether the start has been successful.

Starting the Database

This step is optional because the database is started first automatically by the start script when you start the SAP
system. However, if you start the database manually, you can check the database log before starting the SAP
system.

SAP Microsoft Management Console

The following section describes how to start and stop an SAP system using SAP Microsoft Management Console
(SAP MMC). SAP MMC can only be installed on Microsoft operating systems. However, you can use it to manage
SAP systems from your Windows frontend. These SAP systems can run on any other operating systems (e.g.,
Page 1 of 13
UNIX). In addition, you always have the option to directly start the SAP system on the server via the console or by
using terminal client software, such as Putty, on your frontend computer. For this purpose, log in using the
<sid>adm user, and start the SAP system by entering the startsap command in your console.

3. Open SAP Microsoft Management Console by choosing START · (ALL) PROGRAMS · SAP MANAGEMENT CONSOLE
from the taskbar.

4. Right-click on the system ID of the system you want to start (e.g., V14), and choose the START entry from the
context menu.

Starting the System

5. Enter a START TIMEOUT PERIOD in seconds in the dialog box that opens. If you're only running a single instance,
simply click on OK to confirm.

Defining the Start Timeout

Start Timeout

A start timeout is only relevant if you're running other system instances alongside the central instance. The
central instance must be running before you can start the other instances. Entering a start timeout value indicates
how many seconds the system should wait before starting the other instances. The value is based on the length of
time it takes to start your central instance, based on past experience.

Page 2 of 13
6. Another dialog box opens in which you must authenticate yourself as the administrator of the SAP system. Only
adn1inistrators are authorized to start and stop an SAP system.

System Administrator Authentication

7. This automatically starts the database (if it hasn't already been started) and then the SAP system. In the SAP
Microsoft Management Console, the status is initially yellow, which changes to green after a successful start. In the
PROCESS LIST, all processes have the RUNNING status.

Process List of the System Started

Patience Is a Virtue

It may take several minutes to start an SAP instance. Patience really is an essential characteristic of good system
administrators. You need to wait and remain calm if it takes longer than expected. A red traffic Light icon will alert
you to the occurrence of errors. As long as you don't see any red traffic lights, simply give the system the time it
needs.

8. The system has started. To check whether the SAP system is running, log on to the system with the SAP GUI. You
know that the system has been started correctly if the logon screen appears

Page 3 of 13
Checking the Start Logs

If problems occur when starting the system, you need to check the start logs. You'll find these logs at the operating
system level in the /usr/saplllwork directory. Check for error messages in the following files: ..

sapstart.log ..

sapstartsrv.Jog

.,. dev_disp .,.

dev_ms ...

dev_wO

Eliminate the error, and restart the system.

Logon Screen of the System Started

9. Log on, and check the system log (Transaction SM21-see Section 2.4.1) to determine whether any errors occurred
at startup.

Checking the System Log after Startup

You should wait for a minute or so after starting the SAP system. This makes it easier to read the system log. Several
entries may still be in the process of being written to the log during the start phase. If you wait, you won't need to
refresh the system log view several times to display all of these.

Stopping the SAP Windows System


There are several reasons you may need to stop or restart the SAP system: .,.

An unplanned hardware or software failure ...

Planned hardware or software maintenance .,.

Changes to profile parameters that can't be switched dynamically .,.

Planned complete backup of the server

Page 4 of 13
If you need to stop the SAP system, it's essential that you do so in consultation with your end users. Stopping the
system at your own discretion and without any prior warning is very likely to infuriate users because all unsaved data
are lost.

Preparing for a System Stop

Before you stop the system, you must perform checks and take precautions to ensure that system activities have
ceased at the time of the system stop.

Checking System Activities before Stopping the System

For certain activities, such as large posting jobs, you may find that some transactions have already been posted,
while others have not. A subsequent restore may be problematic in such cases.

Follow these steps before a system shutdown: .,.

 Coordinate the system shutdown with all departments affected. If a group of users has already scheduled an
activity for the period during which you want to shut the system down, and the activity is dependent on a
live SAP system, you may have to postpone your system stop and give a higher priority to the needs of these
users . .,.
 Create a system message (Transaction SM02) to inform all users of the planned system stop . .,.
 Before you stop the system, make sure that no users are still logged on or active in the system (Transaction
SM04 or AL08) . .,.
 In Transaction SM37, check whether any jobs are active or have been scheduled for the time during which
the system stop is to take place. Reschedule all jobs, or cancel the jobs that are due to either run or be
started during the planned system stop.
 Check whether any active processes are still running (Transaction SM50 or SM51) . .,.
 Use Transaction SMGW to search for any active RFC connections, which may indicate interfaces that are
currently running.
 Use the checklist in Table as preparation for stopping the system.

The following tasks must be completed in sufficient time before the SAP system is stopped

 Coordinate the system stop with all departments affected (e.g., accounting, shipping, distribution, etc.).
 Create a system message to inform all users of the planned system stop (Transaction SM02).
 Send an additional email notification to all users affected.
 Reschedule jobs or cancel the jobs that are either due to run or be started during the planned system stop
(Transaction SM37).

The following additional tasks must also be completed shortly before the SAP system is stopped

 Make sure that no active users are still logged on to the system (Transactions SM04 and AL08).
 Make sure that no active background jobs are running (Transaction SM37).
 Make sure that no active processes are running (Transactions SM50 and SM51).
 Check for active external interfaces (Transaction SMGW).

How to stop the SAP system

Stop the application server instances.

Stop the central instance.

Stop the database (optional)

Page 5 of 13
1.Open the SAP Microsoft Management Console by selecting START • (ALL) Programs • • SAP MANAGEMENT
CONSOLE.

2. You can choose to stop the SAP system only or to stop both the SAP system and the database. To stop the SAP
system only, right-click on the name of the instance you want to stop (e.g., V14 0), and choose the STOP entry from
the context menu.

3. If you also want to stop all other instances of the SAP system (e.g .. another ABAP or Java instance belonging to
the system) as well as the database, rightclick on the system ID (e.g .. V14), and choose STOP from the context menu.

Stopping the SAP System

Stopping without the SAP Microsoft Management Console

You can also stop the SAP system using the console. To do so, open a shell or the command prompt, and use the

stopsap r 3 console command. To stop the SAP system and the database, execute the stopsap or stopsap all
command.

4. Select the shutdown type in the dialog box that opens:

HARD (SIGINT): The SAP system is shut down immediately.

SOFT (SIGQUIT/SIGINT): The SAP system first attempts a soft shutdown. If the specified period elapses without a
successful shutdown of the SAP system, a hard shutdown is executed instead.

5. Choose OK to continue.

6. A dialog box opens, in which you're required to authenticate as an administrator. The SAP system may only be
shut down by administrators.

Page 6 of 13
7. Next, the database is stopped, followed by the SAP system, or, alternatively, only the SAP system is stopped,
depending on which selection you've made. The status changes from green to gray in the SAP Microsoft
Management Console. The processes in the PROCESS LIST change their status to STOPPED.

Selecting the Shutdown Type

Process List with Stopped Processes

You've now stopped the SAP system or both the database and SAP system. If you've stopped the SAP system only to
allow changes to profile parameters to become effective, you can now restart the system immediately. If you've
stopped both the SAP system and the database, you can now stop the operating system if necessary and shut down
the physical server.

Page 7 of 13
START AND STOP SAP HANA SYSTEMS
HANA system start-up process flow

During Linux startup (OS boot), by default it starts the process listed under /etc/init.d , our sapstartsrv is part of this
process.

Once the sapstartsrtv is running, it can take command to start or stop the HANA system. Sapstartsrv can also be used
to read log or trace files.

Sapstartsrv trigger the startup of HANA daemon process, this is the process responsible for starting all HANA core
process. HANA daemon starts all the process defined in HDBdaemon.ini.

The HDB daemon process is also responsible for keeping the core process running. The daemon process will restart
the core process if in case they get killed.

Sapstartsrv in HANA

Stopping the SAP HANA instance using any of the methods (STUDIO, COCKPIT, SAPCONTROL, ALTER SYSTEM, HDB)
does not end the SAP start service (sapstartsrv) process itself.

You can stop sapstartsrv service even while the SAP HANA instance is running, this is because, sapstartsrv is not
attached to the SAP HANA process tree. it starts with os boot.

BUT you can’t use HDB stop, HDB start to start and stop SAP HANA Database, because it needs to interact with
sapstartsrv.

HDB COMMAND

(To use this sapstartsrv has to be running) Login as operating system user adm, the commands HDB and SAP Control
can be used to stop and start individual instances:

Page 8 of 13
HDB start

HDB stop

Page 9 of 13
HDB restart (stop + start)

HDB info

HDB Version

These commands run in the foreground, that is, the server session remains blocked until the process finishes.

SAP Control: Stop and Start the SAP HANA Database System

Page 10 of 13
As operating system user adm <sid>adm, the commands HDB and SAP Control can be used to stop and start
individual instances

sapcontrol –nr 00 -function StopSystem

sapcontrol –nr 00 -function StartSystem

Sapcontrol –nr 00 -function GetProcessList

Sapcontrol –nr 00 x-function GetSystemInstanceList

Page 11 of 13
START AND STOP IN SAP HANA STUDIO
SAP HANA Studio

In SAP HANA Studio, you find the functions to start, stop, and restart (stop + start) the system when you right click a
connection to the system database (not a tenant database). You then see the options Start System, Stop System,
and Restart System in the context menu, as shown in the figure below.

SAP HANA studio does not support starting and stopping of individual tenants

Page 12 of 13
HARD SHUT DOWN Vs SOFT SHUDOWN

The pop-up window will appear; here you choose between a soft shutdown, which waits for all active sessions to
end, and a hard shutdown, which kills and rolls back the currently open transactions. For a soft shutdown, you can
also specify a timeout; if there are still open sessions at the end of the timeout period, SAP HANA Studio will do a
hard shutdown. The default timeout period is 10 minutes.

Stopping and Starting sapstartsrv

To stop the service process, use this command:

sapcontrol –nr <xx> StopService

EX: sapcontrol –nr 00 StopService

To restart the service process, use this command:

sapcontrol -nr <xx>StartService

EX: sapcontrol –nr 00 StartService A11

Notice that the StartService function has the DBSID as a mandatory parameter.

Page 13 of 13

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy