How to Configure Continue SQL Server Permissions
You set up continue sql server permissions by making a dedicated database user. Then you put that user into a strict read-only role. Many teams skip this step when they add coding assistants to an editor. They share an existing admin account so the tool works right away. If the assistant has broad rights, a bad query can change or delete rows. How continue sql server permissions work SQL Server splits access into server logins and database users. A database user is the identity of a login ins
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.
You set up continue sql server permissions by making a dedicated database user. Then you put that user into a strict read-only role. Many teams skip this step when they add coding assistants to an editor. They share an existing admin account so the tool works right away. If the assistant has broad rights, a bad query can change or delete rows.
How continue sql server permissions work
SQL Server splits access into server logins and database users. A database user is the identity of a login inside one database. When a user needs many databases on one instance, teams make a master login. Then they map that login to a user in each target database.
When a tool needs only one database, a contained user is an option. This user has a password and does not need a login in master. An admin must turn on contained databases on the server and database first. Overall, SQL Server supports thirteen types of database users.
After you make the user, you assign a fixed database role. You cannot change the rights built into fixed database roles. Every role, including the public role, comes with basic connect rights. The db_datareader role lets a user read all user tables and views. It works well when Continue needs schema details or sample data.
To block changes, teams also use the db_denydatawriter fixed role. A member of db_denydatawriter cannot add, change, or delete any table data. If a table holds secrets, db_denydatareader blocks all reads on user tables and views. It also blocks reads on metadata about those tables and views.
Teams should never give an assistant the db_owner or db_datawriter role. Members of db_datawriter can add, delete, or change data in all user tables. Members of db_owner can run all setup tasks and even drop the database.
What native roles solve and what they miss
Native SQL Server roles control who can log in to a database. They also set broad rules on whether a user can read or write. Putting an assistant in db_datareader stops it from dropping tables or changing rows. Adding db_denydatawriter makes sure no write query can ever run.
Kubernetes API Server Access + AI Agent Permissions: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Still, fixed roles apply to every user table and view at once. A member of db_datareader can read every column in every user table by default. That includes sensitive fields like emails, phone numbers, card numbers, and national IDs. When the assistant runs a select query, those fields flow back into the prompt.
Native roles also do not inspect individual SQL statements in flight. Once a user logs in, the database runs any allowed read query right away. You cannot pause one risky query for a human check before it runs. You also cannot rewrite matched fields in query results on the fly. The database checks who logs in, not what each statement pulls back.
Steps to keep assistant database access safe
Start by creating a separate user just for the coding assistant. Do not share personal developer logins or app service accounts with the tool. Pick a contained database user if the assistant only needs one database. Map the user to db_datareader and add db_denydatawriter for extra safety.
Next, review which tables sit inside that target database. Since db_datareader reads all user tables, keep secret tables in a separate database. You can also use a test database with fake data for daily coding. Yet developers often need real schema and production context to fix tough bugs. That is where team controls must go beyond static database roles.
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
Which fixed role is safest for a coding assistant?
Use the db_datareader role so the assistant can only read user tables and views. Pair it with db_denydatawriter to block all inserts, updates, and deletes.
Should I use a login in master or a contained user?
Use a contained database user if the assistant only needs one or two databases. An admin must enable contained databases on the server and database first.
Does db_datareader hide sensitive columns like emails or card numbers?
No, db_datareader lets the user read all data from all user tables and views. You need data masking to rewrite emails, phone numbers, or card numbers in results.
Related guides
In this post