Azure MS SQL: grant sys.* and msdb.dbo.* select permissions for Grafana monitoring
2
votes
2
answers
230
views
I'm trying to monitor Azure MS SQL databases using [this Grafana dasboard](https://grafana.com/grafana/dashboards/21378-microsoft-sql-server-dashboard/) . It executes several queries to tables whose names start with sys and msdb.dbo.
I've created a dedicated
grafana
user for this and tried adding the user to db.datareader permissions, as well as GRANT SELECT ON SCHEMA :: sys TO [grafana];
, and GRANT view database state TO [grafana];
, but I'm still getting permission errors.
Trying to directly grant select on specific tables (e.g. GRANT SELECT ON sys.dm_exec_query_stats TO grafana;
) on the master database, besides being tedious, seems to not be allowed ever for the master user, as I get SQL Error [S0001]: Permissions for system stored procedures, server scoped catalog views, and extended stored procedures cannot be changed in this version of SQL Server.
.
What's the right way of doing this?
Asked by barmanthewise
(141 rep)
Nov 12, 2024, 07:52 AM
Last activity: Nov 13, 2024, 12:39 AM
Last activity: Nov 13, 2024, 12:39 AM