Monday 11 February 2013

Starting and Stopping SAP


Starting and Stopping SAP

Starting and stopping SAP system is a very much procedural and sequential.
Start Sequential
Start services – Start Database – Start Central Instance – Start Dialog Instance

Start Services
Services will come only in Windows so we need to start the SAP and Database services if they are not running automatically.

SAP Services
1. SAPOSCOL (This will collects OS related information)
2 SAP_ Ex: SAPPRD_00 (Control the SAP instance)

Database Services
1. Create the connection to the database
2. Control DB actions

Start Database
Underlying element of SAP system is Database Therefore database has to be started first.

Start Central Instance
In this stage operating system collector called SAPOSCOL is started. It can also be started later in T-code ST06. SAPOSCOL will runs in the operating system background and collects the data about operating system resources and makes this available through shared memory of all the SAP instances. In this stage first message server and Enqueue server will be started. Once these both are started Dispatcher will be started at last work processes will be started.

Note – Dialog instance should be started after the message server and Enqueue server are started.

Next Step: - When an instance is started it reads the start profile. Start profile contains the information like type of processes, number of processes, Main memory size and other.

Profile path: - usr/sap/SID/sys/profiles

Dispatcher will reads the default profile which contains the configuration information of the instance. Dispatcher will start the work processes and creates the instance specific configuration. After the instance is successfully started all the work processes connects to the database.

Procedure of Starting the SAP System: -
SAP can be started in 2 ways
1. Using the Microsoft management console
2. Using the command startsap

After logon to system execute T-Code SM50 and check the number of work process running and also in OS level execute the command disp+word to see the work process.

Logs of Start Process:-
Status of the start process is written in to the log files in Sap home directory of the relevant instance. Log files will be in the form of……
STDERR1 – Database System
STDERR2 – Message Server
STDERR3 – Dispatcher
Problem Analysis of start process
1. SAP system logs
2. SAP trace files
3. Database error log files
Note: If any problems come while starting the SAP system we need to check the log files. How and where to check?
Go to work directory (path usr/sap/sid/dvbmgs/work
Check the latest updated files of the Dispatcher, Workprocess, and Message Server.
In windows MMC right click on gray colour and select trace file directly it takes to the trace file.

Logs files looks like
1. Startsap.log
2. Stopsap.log
3. StartDB.log
4. StopDB.log
5. Dev_disp - Dispatcher log
6. Dev_msg - Message server log
7. Dev_W(XXX) Work process log
Stopping the SAP system
Mostly the SAP system will be stopped during if not able to overwrite the kernel, when system parameters are changed and for some other maintenance activity. Stopping the SAP system should be in sequence to avoid the inconsistency in the system.

Before stopping the system some of the things need to be taken in to consideration.
1. Check the logged-on users in SM04
2. Check the background jobs running in SM37
3. Batch inputs in SM35
4. Updates in SM13
5. External connections
Note: Before stopping the system it is important to inform all the users, so create the system message in SM02

Sequence is stopping
1. Stop the Dialog instance
2. Stop the central instance
3. Stop the database

4 comments: