> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/engine-guide/sql-server/permissions-and-grants.md).

# Permissions and grants

Provision SQL Server and DataOS access before configuring or deploying a Data Product.

## SQL Server-side permissions and grants

Provision access before configuring a gateway. Three roles are required, each with a distinct scope.

| Role                | Who holds it                    | Purpose                                                            |
| ------------------- | ------------------------------- | ------------------------------------------------------------------ |
| Admin role          | SQL Server sysadmin/DBA         | Creates databases, logins, and grants privileges.                  |
| Vulcan service role | The login Vulcan connects as    | Runs models and manages schemas and tables in the target database. |
| Consumer role       | BI users and endpoint consumers | Reads Data Product tables only.                                    |

Run minimum grants as a sysadmin:

```sql
-- Vulcan service role
CREATE LOGIN vulcan_svc WITH PASSWORD = '<strong-password>';
USE <database>;
CREATE USER vulcan_svc FOR LOGIN vulcan_svc;
ALTER ROLE db_ddladmin ADD MEMBER vulcan_svc;
ALTER ROLE db_datareader ADD MEMBER vulcan_svc;
ALTER ROLE db_datawriter ADD MEMBER vulcan_svc;
GRANT CREATE SCHEMA TO vulcan_svc;
```

Consumer role (read-only):

```sql
CREATE LOGIN vulcan_consumer WITH PASSWORD = '<strong-password>';
USE <database>;
CREATE USER vulcan_consumer FOR LOGIN vulcan_consumer;
ALTER ROLE db_datareader ADD MEMBER vulcan_consumer;
```

Verify grants:

```sql
SELECT dp.name AS principal, r.name AS role
FROM sys.database_role_members m
JOIN sys.database_principals dp ON m.member_principal_id = dp.principal_id
JOIN sys.database_principals r ON m.role_principal_id = r.principal_id;
```

{% hint style="warning" %}
`connection.database` must exist before `vulcan plan`. SQL Server has no `CREATE SCHEMA IF NOT EXISTS` semantics. The adapter creates referenced schemas through guarded DDL when the role has privilege.
{% endhint %}

## DataOS permissions

These permissions are required before you configure or deploy Data Products.

| Permission                                                 | What it allows                                                        | Granted by                                                                                                                                   |
| ---------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Tenant Access                                              | Build and manage Data Products within your tenant.                    | Tenant Admin                                                                                                                                 |
| `roles:id:data-dev` (or your tenant's equivalent role tag) | Create and apply Vulcan resources. Verify with `dataos-ctl user get`. | Tenant Admin                                                                                                                                 |
| `depot:rw:<mssql-depot-name>`                              | Read and write access to the SQL Server depot.                        | Tenant Admin or Data Admin                                                                                                                   |
| `depot:r:<mssql-depot-name>`                               | Read-only depot access for consumers.                                 | Tenant Admin or Data Admin                                                                                                                   |
| Can Use (Compute, Depots, Secrets)                         | Use Compute, Depots, and Secrets. Access is deny-by-default.          | Every permission can be granted to a tenant Role now -grant it once and the whole team, including future joiners, inherits it automatically. |
| git-sync Secret                                            | Pull model code from Git using a Secret.                              | Tenant Admin, Data Admin, or Secret owner                                                                                                    |

Run `dataos-ctl get depot` to confirm read access. If the depot is missing, request `depot:r` from your operator.

### Next step

After access is ready, configure and validate the gateway in [Connect to SQL Server](https://v2.dataos.info/references/engine-guide/sql-server/connect-to-sql-server.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/engine-guide/sql-server/permissions-and-grants.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
