You are on page 1of 18

Week 1: Startup, Dispatcher, and Enqueue Services

Unit 1: Fundamentals of the SAP Start Service


Fundamentals of the SAP Start Service
Usage (1)

The SAP start service is a key element of SAP


systems as of SAP NetWeaver 7.0.
The process is called sapstartsrv.exe on
Windows, and sapstartsrv on UNIX platforms.
This process is a service in Windows operating
systems; in UNIX operating systems, it is
scheduled as a daemon.
There is a separate sapstartsrv process for
each instance, which is responsible for starting,
stopping, and monitoring the instance.
SAP Host Agent also has its own SAP start
service.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 2


Fundamentals of the SAP Start Service
Usage (2)

The sapstartsrv program reads the instance


profile at the beginning. The profile defines
which steps must be performed during the start
process, and which processes of the instance
are started by sapstartsrv.
The profile defines that the database should be
started if it is not yet running.
Normally, the entries for the starting procedure
in instance profiles are not changed; if there
are any changes, sapstartsrv needs to be
restarted.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 3


Fundamentals of the SAP Start Service
Functions

The SAP start service provides the following functions


for monitoring SAP systems, instances, and
processes:
 Starting and stopping
 Monitoring the runtime state
 Reading logs, traces, profiles, configuration files
 Technical information, such as network ports, active sessions,
thread lists, etc.
These services are provided on the SAPControl SOAP
Web service, and used by SAP monitoring tools like the
SAP Microsoft Management Console (SAP MMC) or SAP
Management Console (SAP MC).
You can get the list of all options and so-called Web
methods by running the ‘sapcontrol –h’ or ‘sapcontrol’
command.
© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 4
Fundamentals of the SAP Start Service
Ports (1)

The start service binds to the following ports:


 HTTP port 5<instancenumber>13 by default
(or sapctrl<instancenumber> in /etc/services)
 HTTPS port 5<instancenumber>14 by default
(or sapctrls<instancenumber> in /etc/services)
Port information is included in sapstartsrv.log, in the work folder of every instance.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 5


Fundamentals of the SAP Start Service
Ports (2)

If critical functions (“protected methods”, such as


restarting an instance) are not called using a
trusted connection, they require authentication
with an operating system user and password.
 On UNIX platforms, trusted connections go through
UNIX domain sockets (/tmp/.sapstream<port-no>)
 On Windows, they go through “Windows named pipe”
(\\<host>\pipe\sapcontrol_<instancenumber>)

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 6


Fundamentals of the SAP Start Service
Startup process (1)

An SAP instance is started differently on


UNIX and Windows platforms:
UNIX
The startup procedure is initiated by the start
service, which ideally is started by the sapinit
script when the operating system is booted.
Afterwards, sapstartsrv triggers sapstart to
start the system.
The SAP start service definition is available
in the /usr/sap/sapservices file.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 7


Fundamentals of the SAP Start Service
Startup process (2)

An SAP instance is started differently on


UNIX and Windows platforms:
Windows
On Windows, the start service is started
automatically when the operating system is
booted. The instance is started directly by
the start service.
The SAP start service definition is based on
Windows Registry entries.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 8


Fundamentals of the SAP Start Service
Startup process (3)

The start service reads the instance profile and executes all commands in the instance profile that
contain an Execute_xx statement.
It then starts the processes of the SAP instance, respecting the sequential numbering of
Start_Program_xx statements.
Execute_xx and Start_Program_xx has its own, unique, sequential numbering, starting with 00.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 9


Fundamentals of the SAP Start Service
Start and Stop process of SAP NetWeaver AS ABAP (1)

Instances are started and stopped using


tools such as the SAP Management Console
(SAP MC), SAP Microsoft Management
Console (SAP MMC), or sapcontrol.
The tools for starting and stopping
communicate with the sapstartsrv process,
which also functions as a Web service.
The tools can be used to start or stop
individual instances or the entire system.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 10


Fundamentals of the SAP Start Service
Start and Stop process of SAP NetWeaver AS ABAP (2)

The sapstartsrv processes write a control file


to the $(DIR_GLOBAL)\sapcontrol directory
every minute. The name of the control file
indicates the port and host on which the
process can be accessed, and the priority of
its instance.
Using the control files, the sapstartsrv process
recognizes which other sapstartsrv processes
are still active, and starts the related instances
according to their priority.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 11


Fundamentals of the SAP Start Service
Monitoring tools

The following monitoring tools use the


Web service interface:
 SAP Microsoft Management Console (SAP
MMC)
 SAP Management Console (SAP MC)
 sapcontrol: with sapcontrol (process name on
Windows sapcontrol.exe) you can call the
functions of the Web service interface from the
command field.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 12


Fundamentals of the SAP Start Service
SAP Microsoft Management Console (SAP MMC)

The SAP snap-in for the Microsoft


Management Console (MMC) provides a
graphical user interface to administer SAP
systems from Windows PCs.
By using SAP MMC you can start, stop, and
restart the instance, display the process list,
and display the ABAP work process table. A
lot of other functions are available as well for
all systems that appear in the tree.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 13


Fundamentals of the SAP Start Service
SAP Management Console (SAP MC) (1)

SAP Management Console (SAP MC) is an


operating-system-independent application.
This allows you to display various information
on monitoring and perform administration
tasks such as start and stop operations in the
same interface on different operating systems.

The tool is a standalone Java application,


which can be started either as an applet or
locally. The SAP MC is supplied as standard
with the kernel and is ready for use without
any additional installation. All you need is a
Web browser.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 14


Fundamentals of the SAP Start Service
SAP Management Console (SAP MC) (2)

To start the SAP MC after installing the


relevant SAP NetWeaver AS, enter the
following URL in your browser:
 http://<host name>:5<instancenumber>13
 https://<host name>:5<instancenumber>14

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 15


Fundamentals of the SAP Start Service
SAPControl

SAPControl is part of the kernel, and is


available on all operating systems. Calling
sapcontrol, without any other options,
provides the syntax description.
SAPControl allows the Web services of the
sapstartsrv processes to be addressed.
Such methods are, for example: Start, Stop,
RestartInstance to operate, GetProcessList
to display the process list of an SAP
instance, StartService, StopService or
RestartService to operate the SAP start
service itself, and many more.

© 2017 SAP SE or an SAP affiliate company. All rights reserved. ǀ PUBLIC 16


Thank you.
Contact information:

open@sap.com
© 2017 SAP SE or an SAP affiliate company. All rights reserved.

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP SE or an SAP affiliate company.

The information contained herein may be changed without prior notice. Some software products marketed by SAP SE and its distributors contain proprietary software components
of other software vendors. National product specifications may vary.

These materials are provided by SAP SE or an SAP affiliate company for informational purposes only, without representation or warranty of any kind, and SAP or its affiliated
companies shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP or SAP affiliate company products and services are those that are
set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.

In particular, SAP SE or its affiliated companies have no obligation to pursue any course of business outlined in this document or any related presentation, or to develop or release
any functionality mentioned therein. This document, or any related presentation, and SAP SE’s or its affiliated companies’ strategy and possible future developments, products,
and/or platform directions and functionality are all subject to change and may be changed by SAP SE or its affiliated companies at any time for any reason without notice. The
information in this document is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. All forward-looking statements are subject to various
risks and uncertainties that could cause actual results to differ materially from expectations. Readers are cautioned not to place undue reliance on these forward-looking statements,
and they should not be relied upon in making purchasing decisions.

SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE (or an SAP affiliate company)
in Germany and other countries. All other product and service names mentioned are the trademarks of their respective companies.
See http://global.sap.com/corporate-en/legal/copyright/index.epx for additional trademark information and notices.

You might also like