How to Configure Continue SQL Server Approval
To set up continue sql server approval, pair database roles with local editor prompts. This stops your coding assistant from running bad queries on its own. Engineering teams often start by giving the assistant a shared database login. If that login has broad permissions, one bad prompt can delete table rows. It can also pull sensitive customer fields straight into the chat window. How native continue sql server approval works Setting up continue sql server approval starts inside the database
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
To set up continue sql server approval, pair database roles with local editor prompts. This stops your coding assistant from running bad queries on its own. Engineering teams often start by giving the assistant a shared database login. If that login has broad permissions, one bad prompt can delete table rows. It can also pull sensitive customer fields straight into the chat window.
How native continue sql server approval works
Setting up continue sql server approval starts inside the database engine. A database user is the identity of a login inside a database. SQL Server supports thirteen types of database users for different access needs. When a person or tool needs many databases, admins create a login. That login lives in the master database and maps to user accounts.
For one or two databases, a contained database user works well. This user has a password and does not need a master login. An admin must first turn on contained databases on the server. They must also turn it on for that specific database.
Next, admins assign the user to fixed database roles. You cannot change the permissions built into these fixed roles. Every role, including the public role, includes basic permission to connect. The data reader role lets the user read all user tables. It also lets the user read all views in that database. If you want to block reads, use the deny data reader role. That role blocks reading data and metadata from all user tables.
To allow changes, admins assign the data writer role. Members of this role can add, change, or delete table data. The deny data writer role blocks all of those write actions. Teams must avoid assigning the database owner role to an assistant. The owner role allows all maintenance tasks and can drop the database.
What native roles solve and what they miss
Native database roles decide who can log in and read tables. They also control who can write data across the whole database. Combining a read role with editor prompts catches basic mistakes early. The developer sees the query in the editor before it runs.
Approval Chains & Escalation + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Still, static roles do not check individual statements in flight. A user in the data writer role can alter any user table. If a developer clicks approve too fast, a bad update runs. Native roles also cannot mask sensitive columns during a read query. A data reader account pulls raw emails, phone numbers, and card numbers. The database sends those raw fields right back to the AI tool. True approval needs a way to pause risky queries for a teammate. It also needs to rewrite matched fields like national IDs in results.
Designing a safer workflow for AI database queries
A strong setup separates daily reading from high-risk data changes. Start by giving the assistant an account with the deny data writer role. This blocks accidental updates while the tool reads schema context. Developers can still explore tables and build queries with the assistant.
When the tool needs to run a write query, require human review. A peer should check the exact statement before the database runs it. You should also mask sensitive fields in query results by default. Rewriting emails and card numbers in results keeps private data out of prompts. This layered setup keeps your data safe when developers move fast.
Govern SQL Server queries and responses in flight
Table grants decide which SQL Server objects a caller may touch. They do not check query intent or rewrite sensitive values in results across every client and agent. By design, hoop.dev is an open-source proxy that sits next to SQL Server as a sidecar for your SQL Server. It inspects TDS batches and parameterized queries in real time.
With hoop.dev guardrails and hoop.dev data masking, banned statements are refused with your message. Matched sensitive fields in supported result columns are masked in memory, and each decision is logged per listener. Check out the code on GitHub.
Frequently asked questions
Can I customize the permissions inside SQL Server fixed database roles?
No, SQL Server does not let you change permissions on fixed roles. If you need custom rules, you must create a custom database role. You can also combine allow roles with deny roles for tighter control.
Why should AI tools avoid the database owner role?
The database owner role can run all maintenance and setup actions. It also has the power to drop the entire database at once. Giving this role to an automated assistant creates a huge data loss risk.
Do read-only roles stop sensitive data from reaching the AI model?
No, the data reader role can read every row in user tables by default. It returns raw emails, phone numbers, and card numbers in query results. You need result masking to rewrite those matched fields before they return.
Related guides
In this post