Applications Systems
"MS SQL Server Essentials" results in issues on non-sa Database User on SCM
"MS SQL Server Essentials" is assigned to the Node, but "Poll Now" shows issues when using a non-SA Database User.
First published date
Last published date
Overview
1. On "Poll Now" on "Server Configuration" results in issues on assigned SQL Essentials profile:
2. Mouse-over on Database mail:
3. Clicking on "Show more details" resulted in the following:
4. In this case:
ERROR [42000] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The EXECUTE permission was denied on the object 'sysmail_help_configure_sp', database 'msdb', schema 'dbo'.
Disclaimer:
Scripts are not supported under any SolarWinds support program or service.
Scripts are provided AS IS without warranty of any kind. SolarWinds further
disclaims all warranties including, without limitation, any implied warranties
of merchantability or of fitness for a particular purpose. The risk arising
out of the use or performance of the scripts and documentation stays with you.
In no event shall SolarWinds or anyone else involved in the creation,
production, or delivery of the scripts be liable for any damages whatsoever
(including, without limitation, damages for loss of business profits, business
interruption, loss of business information, or other pecuniary loss) arising
out of the use of or inability to use the scripts or documentation.
Product section
Cause
1. Using 'sa' permissions, running the Stored Procedure returns data:
2. But running in another SQL user:
3. Reference to MS KB - https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sysmail-help-configure-sp-transact-sql?view=sql-server-ver15
4. The user that is querying the Stored Procedure does not have GRANT permissions
Resolution
- Please grant the required permissions as described in the Permissions required to monitor MS SQL Server Essentials in SCM guide.
- In particular, refer to the “Grant execute permission to mail procedures” section. Following those steps will resolve the issue related to the sysmail_help_configure_sp
procedure.