How to Configure JetBrains AI SQL Server Connect
To set up a jetbrains ai sql server connect workflow, create a restricted database user. Then link that account to the IDE data source so the assistant reads schema details. Teams often start by reusing an admin login from a local test file. That quick shortcut gives the AI assistant and the user broad rights across every table. How a native jetbrains ai sql server connect setup works SQL Server separates server logins from individual database users. A database user is the identity of a login
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 connect workflow, create a restricted database user. Then link that account to the IDE data source so the assistant reads schema details. Teams often start by reusing an admin login from a local test file. That quick shortcut gives the AI assistant and the user broad rights across every table.
How a native jetbrains ai sql server connect setup works
SQL Server separates server logins from individual database users. A database user is the identity of a login when it connects to a database. If a person needs access to many databases on an instance, teams create a login. That login sits in the master database and maps to user accounts. For one or a few databases, a contained database user is another option. This user has a password and does not tie to a login in master. An admin must first enable contained databases on the server and the database. SQL Server supports thirteen types of database users in total.
Once the user exists, the admin assigns a fixed database role. Every database role, including the public role, includes basic connect rights. To keep the IDE assistant safe, admins often pick a read-only role. Members of the datareader role can read all data from all user tables and views. Admins can also add the denydatawriter role to block changes. Members of that role cannot add, modify, or delete data in user tables. You cannot change the permissions assigned to fixed database roles.
What native roles solve and what they leave open
Fixed database roles stop bad writes before they happen. If a team uses the owner role by mistake, the risk grows fast. Members of the owner role can run all setup and maintenance tasks. They can even drop the whole database in SQL Server. Moving away from the owner role to the datareader role blocks destructive drops and writes.
Still, native database roles only check who logs in at the start. They do not inspect what individual queries do while in flight. Because the datareader role reads every user table, it can pull sensitive rows. A broad query can return emails, phone numbers, card numbers, or national IDs. Also, sharing static user passwords across developer machines makes key rotation hard for the team. Native roles cannot rewrite matched fields in results or require approval for risky statements.
Kubernetes API Server Access + AI Agent Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
How to tighten database roles for IDE assistants
Start by auditing which database roles your developers use inside their IDEs today. Remove the datawriter role from accounts that only need to draft or check queries. Members of the datawriter role can add, delete, or change data in all user tables. If a table holds secret keys, use the denydatareader role on that account. Members of that role cannot read data or metadata from user tables and views. Pairing strict database roles with runtime controls gives your team much safer query workflows.
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
Should I use a standard login or a contained user for my IDE?
Use a login in master if the developer works across many databases on one instance. Use a contained database user if the developer only needs one or a few databases.
Does the SQL Server datareader role hide sensitive columns from AI tools?
No, members of the datareader role can read all data from all user tables. To block sensitive fields like card numbers or emails, you need field masking in flight.
Can I edit the permissions inside a fixed SQL Server database role?
No, SQL Server does not let admins change the permissions of fixed database roles. You must combine roles or set up custom roles to adjust table permissions.
Related guides
In this post