How to Configure Continue SQL Server Read Only Access
To set up continue sql server read only access, create a dedicated database user. Then assign that user to a read-only database role before linking your editor. Many teams start by sharing an existing developer login with the coding assistant. This fast shortcut creates big risks when that login has broad write rights. A bad prompt can alter rows or drop tables by mistake. Scoping down the database identity is the first step toward safer AI use. How native continue sql server read only access
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 read only access, create a dedicated database user. Then assign that user to a read-only database role before linking your editor. Many teams start by sharing an existing developer login with the coding assistant. This fast shortcut creates big risks when that login has broad write rights. A bad prompt can alter rows or drop tables by mistake. Scoping down the database identity is the first step toward safer AI use.
How native continue sql server read only access works
SQL Server separates server logins from database users. A database user is the identity of a login inside one specific database. When a user needs many databases on an instance, admins create a server login. That login lives in the master database and maps to each target database. If the coding assistant needs only one database, a contained user works well. A contained user has a password and is not tied to a master login. First, an admin must turn on contained databases on the server and database.
After creating the user, the admin assigns fixed database roles to control actions. SQL Server includes fixed roles with permissions that you cannot change. Every role, including the public role, comes with basic database connection rights. To allow read queries, admins add the user to the data reader role. Members of this role can read all data from all user tables and views. To block writes for sure, admins also add the deny data writer role. Members of the deny data writer role cannot add, change, or delete table data. You should never give the database owner role to an AI coding tool. That owner role can change settings, run maintenance, and even drop the database.
What native database roles solve and what they miss
Native database roles stop accidental writes at the storage engine level. When the coding assistant sends an update or delete query, SQL Server blocks it. This setup protects data integrity from broken prompts or bad query logic. It gives teams a basic safety net when testing AI tools against databases.
Still, fixed database roles decide who logs in, not what individual queries return. A user in the standard data reader role can read every user table. That means the coding assistant can still pull sensitive customer records into prompts. If a table holds emails, phone numbers, card numbers, or national IDs, queries return them. You can add a deny data reader role, which blocks all table reads. Yet that role blocks the entire user, not specific columns inside a single query.
Auditor Read-Only Access + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Sharing static passwords inside local editor files also creates a key problem for teams. Developers store database passwords on their laptops to let the assistant run queries. If a laptop is lost or a file leaks, that password is exposed. Rotating that shared password breaks the setup for every developer on the team. Native roles also lack a clear log tying each AI prompt to the user. Database logs only show the shared SQL user name, not the human engineer. Teams need a way to inspect queries and mask fields in flight.
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
Can I change the permissions of the built-in SQL Server data reader role?
No, SQL Server does not let you change permissions on fixed database roles. To limit table reads further, you must create a custom role with specific grants.
What is the difference between a standard SQL login and a contained user?
A standard login lives in the master database and works across many databases. A contained user lives inside one target database and does not need master access.
Does the data reader role stop an AI assistant from reading sensitive columns?
No, the data reader role allows reading all data across all user tables. To protect emails or card numbers, you need field masking on query results.
Related guides
In this post