← ClaudeAtlas

sap-sm12listed

Lists and safely releases SAP enqueue locks (transaction SM12) over RFC — no GUI. Two modes. `list` (read-only) dumps current lock entries via ENQUEUE_READ with a computed lock AGE and a best-effort owner-liveness column, filterable by user / table / lock argument / client / age. `release` (destructive, gated) releases a stale lock ONLY after proving the owner has no session on ANY application server (a liveness gate that reads TH_SERVER_LIST + TH_USER_LIST, and TH_SYSTEMWIDE_USER_LIST on multi-instance systems), showing the lock evidence, requiring the operator to TYPE the owner's user name to confirm, deleting via ENQUE_DELETE, then re-reading to verify and writing an audit line. It hard-refuses whenever the owner is still live or liveness cannot be proven — there is no --force. Automates exactly the risky part of the daily "clear a stuck lock" op (the owner-death check operators get wrong on multi-instance systems), so it is safer than the manual SM12 path, not just faster. Use for: stuck / stale enqueue l
sapdev-ai/sap-dev · ★ 7 · AI & Automation · score 73
Install: claude install-skill sapdev-ai/sap-dev
# SAP SM12 — Enqueue Lock List & Safe Release You list SAP enqueue locks and — only through a liveness gate + typed confirmation — release a stale one, entirely over RFC (SAP NCo 3.1, 32-bit PowerShell). There is **no GUI automation** in this skill: if RFC is unavailable you fail loud with the manual SM12 path, never a half-automated GUI delete. Task: $ARGUMENTS The live enqueue table is memory-resident: it is read with `ENQUEUE_READ` and mutated with `ENQUE_DELETE` (SAP's own enqueue APIs) — **never** with `RFC_READ_TABLE` / SQL on `SEQG3` (Rule 1). --- ## Shared Resources | File | Token | Purpose | |---|---|---| | `<SAP_DEV_CORE_SHARED_DIR>/rules/safety_policy.md` | *(rule)* | **Rule 0 (highest priority)** — environment guard; enforced by Step 0.6 via `sap_safety_gate.ps1` | | `<SAP_DEV_CORE_SHARED_DIR>/rules/skill_operating_rules.md` | *(rule)* | Mandatory operating rules (no SQL writes; no unsolicited deploy; confirm gates) | | `<SAP_DEV_CORE_SHARED_DIR>/rules/error_classes.md` | *(rule)* | `error_class` taxonomy (this skill's `LOCK_*` classes live here) | | `<SKILL_DIR>/references/sap_sm12_lib.ps1` | `%%SM12_LIB_PS1%%` | Shared helpers: generic FM-table reader, lock-age math, server-clock | | `<SKILL_DIR>/references/sap_sm12_list.ps1` | *(reader)* | `list` mode + release-mode re-reader / `-ExpectGone` verifier (ENQUEUE_READ) | | `<SKILL_DIR>/references/sap_sm12_liveness.ps1` | *(gate)* | Owner-liveness verdict (TH_SERVER_LIST + TH_USER_LIST, `-MergeUserList` leg) |