---
title: Azure SQL Server Configuration
slug: kron-dam-supported-databases-and-databases-clients/azure-sql-server-configuration
docTags: 
createdAt: 2025-01-14T09:07:14.075Z
---

### Purpose

In Azure SQL Server, the goal is to create a login and user with minimal read privileges using Azure-specific roles like MS\_ServerStateReader.&#x20;

### Grant Permission

:::CodeblockTabs
Azure SQL Server

```sql
CREATE LOGIN [ username ] WITH PASSWORD = ’password ’;
ALTER SERVER ROLE ## MS_ServerStateReader ## ADD MEMBER [ username ];
CREATE USER [ username ] FROM LOGIN [ username ];
```
:::

### Testing Permission

Connect as \[username] to the Azure SQL Server and execute:&#x20;

:::CodeblockTabs
Azure SQL Server

```sql
SELECT * FROM sys . dm_os_windows_info ;
```
:::

If the query returns data, \[username] can view the server state, indicating that permissions are set up properly.&#x20;
