How to Configure JetBrains AI SQL Server Sandbox
To set up a jetbrains ai sql server sandbox, create a restricted database user. Then assign that user to a read-only database role before linking your editor. Many teams start by reusing their standard developer login for coding assistants. This common shortcut gives the assistant broad rights to change or delete tables. If the assistant runs a bad query, it can break shared test data. How to set up a jetbrains ai sql server sandbox with native roles A safe setup starts inside your database s
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 jetbrains ai sql server sandbox, create a restricted database user. Then assign that user to a read-only database role before linking your editor. Many teams start by reusing their standard developer login for coding assistants. This common shortcut gives the assistant broad rights to change or delete tables. If the assistant runs a bad query, it can break shared test data.
How to set up a jetbrains ai sql server sandbox with native roles
A safe setup starts inside your database server. You first need to pick the right kind of user account. A database user is the identity of a login when it connects. If a person needs many databases on one instance, teams use a master login. For one or a few databases, a contained database user is an option. This user has a password and does not tie to a master login. An admin must first enable contained databases on the server and the database. Microsoft SQL Server supports thirteen types of database users in total.
After you create the user, you must limit what it can do. Native fixed database roles let you control read and write power. Every role, including the public role, has basic rights to connect. You can add your new sandbox user to the data reader fixed role. Members of this role can read all data from all user tables and views. You can also add the user to the deny data writer role. Members of that role cannot add, change, or delete any table data. Avoid the database owner role for any coding assistant setup. An owner can run all maintenance tasks and even drop the whole database. Note that you cannot change the permissions built into fixed database roles.
Why native roles alone do not stop every risk
Native roles are great for deciding who can log into the database. They block an assistant from dropping tables or changing rows when set up right. Still, static roles do not inspect individual queries while they run. A read-only user can still read every user table and view in the database.
Many sandbox databases hold copies of real customer data from production. If a table holds emails, phone numbers, card numbers, or national IDs, the role allows reading them. When your coding assistant reads schema or sample rows, those fields return in plain text. Data masking is needed to rewrite matched fields in results before they reach the client.
AI Sandbox Environments + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Static roles also lack statement-level checks for heavy queries. A poorly written query from an assistant can scan millions of rows at once. This can lock up the shared sandbox server for the rest of your team. Also, sharing static database passwords across developer laptops creates key rotation headaches. When someone leaves the team, you must update the password on every machine. Native roles control initial login rights, but they do not manage live queries in flight.
Best practices for ongoing sandbox safety
Keep your sandbox data small and clean whenever you can. Strip out real emails and card numbers before loading test tables. Review your database role members each month to catch overly broad accounts. Make sure no coding tool uses a database owner account for daily work. Separate human admin logins from the accounts used by automated editor tools. This split makes it much easier to track which queries came from an assistant.
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 a SQL Server fixed database role?
No, the permissions assigned to fixed database roles cannot be changed. If you need custom table rules, you must create a user-defined role instead.
Should I use a master login or a contained user for a single sandbox?
A contained database user is a good option for one or a few databases. It uses its own password and does not need a login in master.
Does the data reader role hide sensitive columns like phone numbers?
No, members of the data reader role can read all data in user tables. It does not rewrite emails, phone numbers, card numbers, or national IDs in results.
Related guides
In this post