SQL Server Permissions List

Published
Length
3 min read

Luis Felipe Dias

All posts

A sql server permissions list maps out what logins and database users can do. It covers server logins, database users, and fixed roles that control data read and write actions. Teams use this list to check who can read tables or change data. When an engineer or AI tool queries a database, these rules decide what runs. How the sql server permissions list works in practice SQL Server splits access into two layers. First, a login lets a person or app enter the server instance. Next, a database

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.

A sql server permissions list maps out what logins and database users can do. It covers server logins, database users, and fixed roles that control data read and write actions.

Teams use this list to check who can read tables or change data. When an engineer or AI tool queries a database, these rules decide what runs.

How the sql server permissions list works in practice

SQL Server splits access into two layers. First, a login lets a person or app enter the server instance. Next, a database user represents that login inside a specific database.

For people who use many databases on one instance, a login in master is common. That login maps to a standard SQL user inside each database. For people who need just one database, teams can use a contained database user.

A contained user has a password inside the database itself. It does not tie back to a login in the master database. An admin must turn on contained databases on the server and database first. Across the engine, there are thirteen types of database users.

Once a user exists, admins group rules using fixed database roles. You cannot change the rules assigned to these built-in roles. Every role, including the public role, holds the basic permission to connect.

The data reader role lets members read all data from all user tables and views. The data writer role lets members add, delete, or change data in all user tables. The owner role can do all setup and upkeep tasks, and can drop the database.

Admins also use deny roles to block actions. The deny data reader role stops a user from reading any user tables, views, or metadata. The deny data writer role blocks a user from adding, changing, or deleting any data.

Security and operational tradeoffs of native database roles

Built-in roles make initial setup fast for small teams. Still, they apply broad rules across an entire database. A data reader member can read every single user table and view without limits.

Kubernetes API Server Access + AI Agent Permissions: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

That includes tables with customer emails, phone numbers, card numbers, or national IDs. Native roles do not rewrite matched fields in query results on the fly. If an engineer or AI agent has read access, they get the full table output.

Static database users also create key management work for engineering teams. Shared passwords for contained users or logins can leak in local files or chat logs. Rotating these keys takes manual work and can break running apps.

Native roles also lack per-query approval steps during an active session. Once a user has the data writer role, any update or delete query runs right away. If someone forgets a filter clause, the database will not pause to ask a peer.

How to audit and tighten database access

Start by listing every login on the server and every user in each database. Check who belongs to the owner role and move daily users to narrower roles. Remove old logins and unused contained users right away.

Next, separate human users from automated apps and AI agents. Give read-only roles to people who only need to check data or fix bugs. Use deny roles when you must block specific accounts from sensitive tables or write actions.

Finally, look at what happens after a user logs in. Pair database roles with query logging and data masking for fields like emails and card numbers. This keeps daily work safe without adding dozens of custom database roles.

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 sits inline in the TDS protocol beside the database as a sidecar for your SQL Server. For every query an agent or human runs in production, hoop.dev decides whether to pass, mask, block, or escalate it for review.

With hoop.dev SQL Server controls, rules refuse banned statements before they run, hold risky queries for human review, and mask matched sensitive values in supported result columns in memory. 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

What is the difference between a login and a database user?

A login is for the server instance and lives in the master database. A database user is the identity of that login inside one specific database. Contained users skip the master login and keep their password inside the target database.

Can I edit the rules inside a fixed database role?

No, you cannot change the permissions assigned to fixed database roles in SQL Server. For example, the data reader role always grants read access to all user tables and views. If you need custom rules, you must create a user-defined role instead.

How do deny roles interact with read and write access?

The deny data reader role blocks a user from reading any user tables, views, or metadata. The deny data writer role stops a user from adding, changing, or deleting data in tables. Admins use these roles to enforce strict blocks on specific database users.

The query runs. The emails stay hidden.