QueryShield

Is it safe to let Claude or ChatGPT write SQL against my production database?

Not without guardrails — and not with a connection string that has more than the minimum privileges. The realistic risk model has three tiers:

Production-safe pattern: (1) dedicated DB role with SELECT only on a curated view layer, (2) AST validator + policy engine between LLM and DB (QueryShield or equivalent), (3) evidence log shipped to your SIEM. With those three, letting an LLM author SQL is comparable in risk to letting a junior analyst with read access to a sanctioned view query the warehouse.