SAP Startup & Shutdown: A Complete Basis Procedure Guide
Starting and stopping SAP instances is one of the most routine — yet most critical — activities a Basis administrator performs. It comes up during maintenance windows, upgrades, system refreshes, patching, and any other planned downtime activity. Done correctly, it's a non-event. Done carelessly, it can mean corrupted work processes, inconsistent enqueue locks, or an application server that simply won't come back up cleanly.
This article walks through the mechanics of SAP startup and shutdown, the commands you'll actually use, a real-world Basis scenario, and the interview questions that tend to come up around this topic.
Key Concept
At the center of every SAP start/stop operation are two components working together:
sapcontrol— the command-line tool used to send control requests (start, stop, restart, status check).sapstartsrv— the SAP Start Service that receives those requests and manages the actual SAP instance and its processes.
In short: sapcontrol sends the request → sapstartsrv manages the instance.
How It Works
The flow is a simple three-stage chain:
sapcontrol --sends request--> sapstartsrv --manages--> SAP Instance / Processes
(Command / Tool) (SAP Start Service) (Processes)- Request is sent — an administrator (or a script) issues a command via
sapcontrol. - Request is received and managed —
sapstartsrvpicks up the request and controls the instance accordingly. - Processes are started or stopped — the actual SAP work processes, dispatcher, and related processes are brought up or down.
Common Commands
Replace <instance_number> with the actual instance number of your system (e.g., 00, 01, 02).
| Activity | Command (Example) |
|---|---|
| Check process status | sapcontrol -nr <instance_number> -function GetProcessList |
| Start SAP instance | sapcontrol -nr <instance_number> -function Start |
| Stop SAP instance | sapcontrol -nr <instance_number> -function Stop |
| Restart SAP instance | sapcontrol -nr <instance_number> -function Restart |
💡 Tip: Always run GetProcessList both before and after a start/stop action to confirm the actual system state — don't assume a command succeeded just because it returned without error.
Request Flow
Starting a SAP Instance
sapcontrol -function Start --> sapstartsrv --> SAP Instance StartsStopping a SAP Instance
sapcontrol -function Stop --> sapstartsrv --> SAP Instance StopsWorked Example
sapcontrol -nr 00 -function Stop --> sapstartsrv --> SAP Instance StopsReal-Time Basis Scenario
Situation: An Application Server (PAS) needs to be restarted during a planned maintenance window.
Basis activities performed, in order:
- Check the current status of the PAS instance.
- Confirm the maintenance window with the team.
- Inform users about the activity.
- Stop the PAS instance gracefully.
- Verify that all processes have stopped.
- Start the PAS instance.
- Verify the process list again.
- Perform post-startup checks (SM51, RZ20, Enqueue status).
⚠️ Note: ASCS (Message Server + Enqueue Server) is not stopped when restarting the PAS. It remains running throughout — stopping ASCS unnecessarily would drop enqueue locks and impact the whole system, not just the application server being restarted.
Important Points to Remember
sapcontrolis the tool used to control and monitor SAP instances.sapstartsrv(SAP Start Service) receives the request and manages the instance.- Always verify the system state before and after any startup/shutdown activity.
- Follow the approved maintenance procedure — don't improvise the sequence on a production system.
Older Scripts (Still Encountered, But Legacy)
You may still come across:
startsap— used to start SAP (older method)stopsap— used to stop SAP (older method)
Note: Modern SAP systems prefer sapcontrol, since it integrates properly with sapstartsrv and provides more granular, scriptable control than the older start/stop scripts.
Interview Questions
Q: What is the difference between sapcontrol and sapstartsrv?
A: sapcontrol is the command-line tool used to send control commands (Start, Stop, Status, etc.). sapstartsrv is the SAP Start Service that receives those requests and manages the SAP instance's processes.
Q: Which command is used to check SAP instance status?
A: sapcontrol -nr <instance_number> -function GetProcessList
Q: What happens when you run a stop command?
A: sapcontrol sends the request to sapstartsrv, and sapstartsrv stops the SAP instance's processes gracefully.
Key Takeaway
sapcontrolsends the request →sapstartsrvreceives and manages it → SAP instance processes are started or stopped.- Understanding this flow is essential for daily operations, maintenance activities, and troubleshooting.
- Always verify the system state before and after the activity to ensure system stability.

No comments:
Post a Comment