Skip to main content
Use the section that matches your Azure SQL deployment.

Azure SQL Database

Run the following as the Azure SQL server administrator. Create the login in the virtual master database, then create a user in every application database you monitor:
The collector connects to each Azure SQL Database separately. Do not configure master or other system databases as monitored databases.
On service objectives other than Basic, S0, S1, and elastic pools, you can grant VIEW DATABASE STATE to the database user instead of adding the login to ##MS_ServerStateReader##. Use the server role for a consistent setup across Azure SQL Database service objectives.

Azure SQL Managed Instance

Run the following as a server administrator:

Verify permissions

Connect with the querycomment login to a monitored database, then run:
The first query confirms access to cached statement statistics. The second confirms access to query text. Either query can return no rows on an idle instance. Run representative application traffic, then check again.

Configure the collector

Continue to configure the SQL Server collector.