Query-level approval would have stopped it.
This is the control most teams do not have but desperately need. Instead of opening your entire database to any approved developer or automation, query-level approval puts every critical read or write behind a fast, human checkpoint. You see the query. You approve or reject it instantly. Nothing runs without that green light.
The problem with traditional access control is its lack of granularity. Role-based permissions and static privileges are only a partial shield. Once someone has access, they can run destructive operations—by accident or on purpose—without oversight. Query-level approval changes that model. You don’t trust the role alone. You trust the specific query, at the specific moment, for the specific purpose.
A real query-level approval flow starts with an access request. The request includes the exact SQL statement, target database, and user identity. Reviewers check for safety, correctness, and scope. They approve, deny, or request edits. Approvals are logged for security audits, compliance, and debugging. This prevents mistakes, defends against malicious actions, and limits damage from compromised credentials.