How to Configure Continue SQL Server Credentials
To set up continue sql server credentials, create a read-only database user first. Then pass that login to your local assistant so it can read schemas. Teams often start by sharing a strong local login for fast setup. That shortcut gives the coding tool far too much power over your tables. If an assistant holds write rights, a bad prompt can change live rows. It can even drop a whole database if it uses an owner role. Setting up a scoped login is the first step toward safe database queries. H
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 credentials, create a read-only database user first. Then pass that login to your local assistant so it can read schemas.
Teams often start by sharing a strong local login for fast setup. That shortcut gives the coding tool far too much power over your tables. If an assistant holds write rights, a bad prompt can change live rows. It can even drop a whole database if it uses an owner role. Setting up a scoped login is the first step toward safe database queries.
How continue sql server credentials work with database roles
SQL Server splits login rights into two clear layers. A login in the master database lets a person or tool enter the server. A database user is the identity of that login inside one specific database. When someone needs many databases on an instance, a login in master is common. For just one database, a contained database user with a password works well. An admin must enable contained databases on the server and database first. SQL Server supports thirteen types of database users across these setups.
Once the user exists, you assign a fixed database role to limit actions. Every role, including the public role, comes with basic connect rights. You cannot change the permissions built into fixed database roles. For a coding assistant, teams usually pick the data reader role. Members of this role can read all data from all user tables. They can also read from all user views in that database. If you want to block writes for sure, add the deny data writer role. Members of that role cannot add, change, or delete any table data.
You should avoid the data writer and owner roles for AI tools. The data writer role can add, delete, or change rows in all user tables. The owner role can run all maintenance tasks and even drop the database.
How local assistants use database logins
Your coding assistant runs on your machine and reads local settings files. You place the server name, database name, user, and password into those settings. When you ask a question about your schema, the tool opens a session. It sends SQL queries under the database user you set up.
Ephemeral Credentials + Kubernetes API Server Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Because these keys sit on disk, every developer needs a safe setup. Shared static passwords create risk when people leave a team or rotate keys. Storing plain text passwords in project folders can also leak secrets into git. Teams should store secret values in local system variables instead of shared files.
What native roles solve and what they leave open
Native SQL Server roles decide who can log in and which objects they touch. Combining data reader and deny data writer stops the tool from changing rows. You can also use the deny data reader role to block table reads. That role stops reads across all user tables and views at once.
Still, fixed roles apply at the whole database level. A data reader user can read every row and column in all user tables by default. Native roles do not inspect what individual queries do while they run. If a table holds emails, phone numbers, card numbers, or national IDs, queries return them. The coding assistant then sends those raw results into the model prompt. Native roles also do not require human approval before a heavy query runs. They cannot rewrite sensitive fields in results on the fly.
Add runtime guardrails beside SQL Server
Role grants and network rules are needed setup for SQL Server. Still, an allowed user or agent tool can send a bad delete or read raw customer fields over a valid session. In practice, hoop.dev runs beside the database as a sidecar for your SQL Server and checks TDS traffic without changing how clients log in.
With hoop.dev SQL Server controls, rules refuse banned statements before they run and can hold risky queries for human review. Matched sensitive values in supported result columns are masked before they reach the client. Furthermore, hoop.dev holds SOC 2 Type II and generates evidence for HIPAA, PCI DSS, SOX, and GDPR audits. See the source on GitHub.
Frequently asked questions
Should I use a master login or a contained user for Continue?
Use a contained database user if the assistant only needs one database. It keeps the user and password inside that single database without a master login. Just remember an admin must enable contained databases on the server first.
Can I edit the permissions of the built-in data reader role?
No, SQL Server does not let you change permissions on fixed database roles. The data reader role always grants read access to all user tables and views. To restrict specific tables, you must create custom roles or set table permissions.
How do I make sure the assistant cannot edit any rows?
Place the database user in the data reader role for read access. Then add the user to the deny data writer role as well. This blocks the account from adding, changing, or deleting data in user tables.
Related guides
In this post