sap-system-lifecyclelisted
Install: claude install-skill adam0thman/sap-basis-ops
# SAP System Lifecycle (start / stop / restart)
`sapcontrol` orchestrates the **SAP instances**; it does **not** start or stop the **database** —
the official SAPControl documentation states *"The database is not stopped by these commands. You have
to stop the database using database-specific tools or commands."* [V, L1] So a full system operation is
always **two layers**: the DB (via [sap-db-command-reference](../sap-db-command-reference/SKILL.md)) and
the instances (here).
> **`startsap` / `stopsap` are deprecated** — use SAPControl. (SAP Notes 1763593, 809477.) [V, L1]
## Guardrail contract (see repo README)
1. **Identify** — SID, hosts, instance numbers, DB type/OS, and the **topology** (§1) before acting.
2. **Classify** — PRD vs non-PRD; any stop against **PRD** needs an explicit typed confirmation.
3. **Preview** — show the exact command + blast radius. `StopSystem` has no dry-run.
4. **Execute** — via the user's shell/SSH MCP, **one layer/step at a time**, never chained across a stop.
5. **Verify** — `GetProcessList` / `GetSystemInstanceList` after each step (§5).
---
## 1. Identify the topology first
List every instance of the system, its host, ports, start priority and status: [G, L4]
```bash
# UNIX (host agent copy):
/usr/sap/hostctrl/exe/sapcontrol -nr <nr> -function GetSystemInstanceList
# Windows:
%ProgramFiles%\SAP\hostctrl\exe\sapcontrol.exe -nr <nr> -function GetSystemInstanceList
```
Output columns: `hostname, instanceNr, httpPort, httpsPort, startPri