Azure SQL Database
Run the following as the Azure SQL server administrator. Create the login in the virtualmaster database, then create a user in every application database you monitor:
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 thequerycomment login to a monitored database, then run: