How to Configure JetBrains AI SQL Server Credentials
You set up jetbrains ai sql server credentials by creating a read-only database user. Then you add those login details to your local database tool. Many teams start by sharing one broad admin login across all local developer tools. That choice lets AI assistants run risky changes or drop tables by mistake. A safer setup uses strict database roles that limit what the tool can do. How to set up jetbrains ai sql server credentials SQL Server splits access into server logins and database users. A
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 jetbrains ai sql server credentials by creating a read-only database user. Then you add those login details to your local database tool. Many teams start by sharing one broad admin login across all local developer tools. That choice lets AI assistants run risky changes or drop tables by mistake. A safer setup uses strict database roles that limit what the tool can do.
How to set up jetbrains ai sql server credentials
SQL Server splits access into server logins and database users. A database user is the identity of a login inside one specific database. When someone needs to reach many databases, admins make a login in the master database. Then they map a database user to that master login.
For one or two databases, a contained database user is a good option. This user has a password and is not tied to a master login. An admin must first turn on contained databases on the server and database. Note that SQL Server offers thirteen different types of database users for various setups.
After you make the user, you must assign the right permissions. Fixed database roles offer a quick way to manage these rights. You cannot change the permissions that belong to fixed database roles. Every role, including the default public role, holds the basic permission to connect.
To keep AI tools from changing data, assign 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 the account for extra safety. That role stops the user from adding, changing, or deleting any table data. Avoid the owner role, because it can do all maintenance and drop the database.
What native roles solve and what they leave open
Native SQL Server roles decide who can log in to a database. They also control which broad actions a user account can take. A datareader account stops an AI assistant from altering tables or deleting rows. This setup protects your core tables from bad write queries.
Still, fixed roles do not check what individual queries do in flight. The datareader role lets the user read every user table and view. It cannot hide specific sensitive columns inside a table that the user can read. If a table holds emails, phone numbers, or card numbers, the query returns them. National IDs in those tables also come back in plain text.
Ephemeral Credentials + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Static roles also leave a gap when you share passwords on laptops. Developers must store the user password inside their local IDE settings. If a laptop is lost, an admin must rotate the password by hand. Native roles also do not link shared SQL logins to a single person. When five developers share one login, the server logs show one user name.
Balancing read access and data privacy for AI tools
AI tools work best when they can read schema details and sample rows. This context helps the assistant write accurate queries for your team. Yet giving full read rights across all user tables creates a privacy risk.
You can use the denydatareader role to block all user tables and views. That role also blocks metadata, which hurts the AI assistant when it writes queries. Teams need a way to allow schema reads while rewriting sensitive fields in results. Masking emails, phone numbers, and card numbers in results keeps test queries safe. This approach lets developers use AI tools without pulling raw personal data onto laptops.
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
What is the safest SQL Server role for an AI assistant?
Assign the user to the fixed datareader role and the denydatawriter role. This pair lets the tool read tables and views while blocking all data changes.
Should I use a master login or a contained user for IDE tools?
Use a contained database user if the tool only needs one or two databases. Use a master login when the user must reach many databases on the server.
Can the fixed datareader role hide specific columns like phone numbers?
No, you cannot change the permissions of fixed database roles in SQL Server. Members of the datareader role can read all data across all user tables.
Related guides
In this post