How to Configure Continue SQL Server Sandbox

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up a continue sql server sandbox, create a restricted database user. Then assign that user a read-only role before connecting your coding assistant. Teams often link coding tools to test databases using shared admin accounts. This approach is fast, but broad roles create big risks for your data. An assistant with full rights can change tables or drop the whole database. A safe setup pairs your coding tool with strict database user rules. How a continue sql server sandbox works with nati

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 a continue sql server sandbox, create a restricted database user. Then assign that user a read-only role before connecting your coding assistant. Teams often link coding tools to test databases using shared admin accounts. This approach is fast, but broad roles create big risks for your data. An assistant with full rights can change tables or drop the whole database. A safe setup pairs your coding tool with strict database user rules.

How a continue sql server sandbox works with native roles

SQL Server splits access into server logins and database users. A database user is the identity a login uses inside one database. There are thirteen types of database users available in the system. When a person or tool needs many databases, admins create a login in master. They then map that login to a SQL user in each target database.

For a single sandbox database, a contained database user works well. This user has a password and does not need a login in master. An admin must first turn on contained databases on the server and database. This keeps the assistant isolated to that single sandbox space.

Once the user exists, you must limit what it can do. SQL Server provides fixed database roles with set permissions that you cannot change. Every role, including the public role, has basic rights to connect. For a read-only setup, admins add the user to the datareader role. Members of this role can read all data from all user tables and views. You can also add the denydatawriter role to block all data changes. This role stops the user from adding, changing, or deleting any table data. Avoid the owner role, which allows full maintenance and can drop the database.

What native database roles solve and what they miss

Native database roles decide who can log in and which objects they reach. A read-only role stops the coding assistant from running delete or update statements. Contained users also stop the tool from jumping to other databases on the server. These native controls form a strong first step for any test setup.

Still, fixed roles apply to whole tables rather than individual queries in flight. A user in the datareader role can read every row and column by default. Test databases often hold real data copied from production systems. This means the assistant can pull emails, phone numbers, card numbers, or national IDs. That raw data then flows into the model prompt and external logs.

Kubernetes API Server Access + AI Sandbox Environments: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

You can use the denydatareader role to block all table reads and metadata. Yet that blocks the assistant from doing useful schema checks in the sandbox. Fixed roles cannot rewrite sensitive fields in query results on the fly. They also do not require human approval when a developer needs temporary write rights. Teams must manage static passwords on every developer machine as well.

Best practices for isolating coding assistant queries

Start by removing shared owner accounts from all local developer tools. Create a dedicated contained user just for the coding assistant in your sandbox. Assign only the datareader and denydatawriter roles to this new user. Check your sandbox tables to see if they hold real customer records.

If your sandbox holds sensitive columns, native roles alone are not enough. You need a way to inspect queries and mask fields in the results. Rewriting matched fields like emails or card numbers keeps prompts safe. Good query logs also show every statement the assistant runs during a coding session.

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 change the permissions inside a fixed SQL Server role?

No, you cannot change the permissions assigned to fixed database roles. Instead, combine roles like datareader and denydatawriter to get the exact limits you need.

Should I use a login in master or a contained user for a sandbox?

Use a contained database user if the assistant only needs one or a few databases. It uses its own password and avoids creating a server-wide login in master.

Does the read-only role hide sensitive columns from my coding assistant?

No, the datareader role lets the user read all data in all user tables. To hide emails or card numbers in results, you need data masking.

The query runs. The emails stay hidden.