Monitoring servers without sysadmin permissions
Published 17 August 2020
If you are unable to grant sysadmin permissions on monitored servers to the monitoring account, follow this guide to configure SQL Monitor and prevent it from attempting to perform actions which require sysadmin permissions. You can find a list of required permissions here.
Sysadmin is required by SQL Monitor to run the DBCC DBINFO command to determine the last integrity check for a database (required for the Integrity check overdue alert) as well as enabling the deadlock trace flag to collect deadlock information (not required when using Extended Events for deadlock collection). To prevent SQL Monitor from trying to perform these actions, you will need to disable collection for the Integrity check overdue alert
If you wish to still get Deadlock alerts, you must either enable Extended Events for deadlock monitoring or enable the SQL Server trace flag 1222 on your monitored servers
Disabling integrity check collection
Follow these steps on the machine where you have installed the SQL Monitor Base Monitor service:
- Open the following folder:
%programdata%\Red Gate\SQL Monitor
- Make a copy of the
RedGate.SQLMonitor.Engine.Alerting.Base.Service.exe.settings.config
file and store it. - Open the original file and locate the
<collectionSchedules>
section. Add the following new schedule:
collectionSchedule
<schedule qualifiedChannelName="[Cluster].[SqlServer].[Database].[IntegrityCheck]"> <disabledSchedule /> </schedule>
A default file with this addition will have a
<collectionSchedules>
section like the following:Full collectionSchedule
<collectionSchedules> <!-- Four schedules are available: intervalSchedule **************** parameters interval="hh:mm:ss" Collect every hh:mm:ss. The full accepted format is "d.hh:mm:ss.ff". [ref: http://msdn.microsoft.com/en-us/library/se73z7b9%28v=VS.90%29.aspx ] disabledSchedule **************** (no parameters) A special schedule that disables collection. dailySchedule ************* parameters hour="hh" minutes="mm" collect once a day, at the specified local time (24-hour clock) weeklySchedule ************** parameters dayOfWeek="dddddd" hour="hh" minute="mm" Collect once a week, at the specified local time, on the specified day. Day names are taken from the set (Monday .. Sunday) [ref: http://msdn.microsoft.com/en-us/library/system.dayofweek.aspx ] If a schedule parameter is specified incorrectly, the Base Monitor service will fail to start. A full reason will be logged to the Red Gate section of the Event Log. The metric is specified by a qualifiedChannelName. NB. All schedule times are in the local time zone of the Monitoring Service not UTC --> <!-- Examples <schedule qualifiedChannelName="[Cluster].[Machine].[Process]"> <intervalSchedule interval="00:01:00"/> </schedule> <schedule qualifiedChannelName="[Cluster].[SqlServer].[Database]"> <disabledSchedule /> </schedule> <schedule qualifiedChannelName="[Cluster].[SqlServer].[Database].[Table]"> <dailySchedule hour="1" minute="0" /> </schedule> --> <schedule qualifiedChannelName="[Cluster].[SqlServer].[Database].[IntegrityCheck]"> <disabledSchedule /> </schedule> <schedule qualifiedChannelName="[Cluster].[SqlServer].[Database].[Table].[Index]"> <weeklySchedule dayOfWeek="Sunday" hour="1" minute="00"/> </schedule> </collectionSchedules>
- Save and close the file.
- Restart the SQL Monitor Base Monitor service.