How to Configure Devin SQL Server Approval
To set up devin sql server approval, create a restricted database user and require human review before the agent runs writes. You can pair native SQL Server roles with workflow checks so the AI agent does not alter data on its own. Many teams start by giving the agent a shared login to speed up testing. Broad roles let an autonomous tool modify tables, drop objects, or pull sensitive rows without a check. How native roles handle devin sql server approval SQL Server splits identity between the
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 devin sql server approval, create a restricted database user and require human review before the agent runs writes. You can pair native SQL Server roles with workflow checks so the AI agent does not alter data on its own. Many teams start by giving the agent a shared login to speed up testing. Broad roles let an autonomous tool modify tables, drop objects, or pull sensitive rows without a check.
How native roles handle devin sql server approval
SQL Server splits identity between the server instance and the individual database. A database user is the identity of a login when it connects to a database. For an agent that needs many databases on an instance, teams create a login in master first. For access to one or a few databases, a contained database user with a password is an option. An admin must first enable contained databases on both the server and the target database. SQL Server supports thirteen types of database users to match different identity setups.
Once the user exists, admins assign fixed database roles to control what the agent can do. Every role, including the default public role, holds permission to connect to the database. Members of the fixed reader role can read all data from all user tables and views. If you want to block reads on specific schemas, the fixed deny reader role stops all table and view reads. When the agent needs to change records, the fixed writer role lets it add, delete, or change data in all user tables. The fixed deny writer role blocks the user from adding, changing, or deleting any table data.
Teams should never place an AI agent in the fixed database owner role. That owner role can run all maintenance tasks and can even drop the entire database in SQL Server. Remember that the permissions assigned to fixed database roles cannot be changed. Admins add users to these fixed roles using the standard alter role statement, while Azure Synapse uses a system stored procedure instead.
Why native roles fall short for agent workflows
Fixed database roles decide who logs in, not what individual statements do in flight. SQL Server does not have a built-in pause button that waits for a human to approve a single query. If you grant the fixed writer role, the agent can update one row or delete a million rows in any user table. If you keep the agent in the fixed deny writer role, every write fails until an admin changes the role by hand.
This manual role switching slows down engineering teams and creates security gaps. An admin might grant write permissions for one task and forget to remove them afterward. The agent then keeps write rights across all user tables for future tasks. Read roles also create risk when tables hold sensitive fields. A user in the fixed reader role pulls every column from every user table and view by default. Native roles do not rewrite emails, phone numbers, card numbers, or national IDs in query results before they reach the agent.
Approval Chains & Escalation + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Managing statement reviews and sensitive data
Safe agent workflows separate read actions from state changes at the query level. Engineers let the agent run safe read queries to inspect schemas and debug app bugs. When the agent proposes an update or delete statement, the team reviews that exact statement before it runs. This keeps the database safe from bad logic or unintended bulk deletes.
Teams also need to protect sensitive columns during read sessions. Masking rewrites matched fields like emails, phone numbers, and card numbers in query results. The agent gets the schema structure and safe test values it needs to write code. At the same time, real customer contact details and payment numbers stay out of the agent context.
Check SQL Server batches and results on the wire
SQL Server logins and roles decide who connects. They do not check what each TDS batch does or mask sensitive values in returned rows. With hoop.dev, you run an open-source proxy, a sidecar for your SQL Server. It reads plain batches and parameterized queries on the TDS wire while passing Windows login through untouched.
Before a batch hits the server, hoop.dev guardrails check the statement against your rules. Disallowed actions get a native TDS error with your message. On the way back, hoop.dev data masking rewrites sensitive values in supported result columns that match your rules. Every query and decision is logged. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Does SQL Server have a built-in query approval queue for AI agents?
No, SQL Server checks permissions when a query runs and either executes it or blocks it right away. It cannot pause a session to ask a human in chat for approval before running a statement.
Can I edit the permissions of the fixed reader or writer roles?
No, the permissions assigned to fixed database roles in SQL Server cannot be changed. If you need custom table rules for an agent, you must create a custom database role and grant specific object permissions.
Should I use a standard login or a contained user for Devin?
Use a contained database user if the agent only needs one or a few databases, after enabling containment on the server and database. Use a standard login in master if the agent must query many databases across the same instance.
Related guides
In this post