Released: SCOM Management Packs for SQL Server, Reporting Services, Analysis Services (7.0.32.0)

Published Jun 29 2021 02:16 AM 1,908 Views
Microsoft

Updates to SQL Server, Reporting Services, and Analysis Services Management Packs are available (7.0.32.0). We also released an update to SQL Server Dashboards MP. You can download the MPs from the links below. Majority of the changes are based on your direct feedback. Thank you.

 

Microsoft System Center Management Pack for SQL Server

Microsoft System Center Management Pack for SQL Server Reporting Services

Microsoft System Center Management Pack for SQL Server Analysis Services

Microsoft System Center Management Pack for SQL Server Dashboards

 

Another change we've done recently is to move operations guides for all SQL Server family of management packs from download center to docs.microsoft.com. This unifies the content viewing experience for the user as the rest of the SCOM and SQL Server documentation is already there. Further more, it allows us to present you with the most up to date and accurate content online. The link to the operation guide for each MP can be found on the MP download page. Here are the links that show what's new in these MPs:

Features and Enhancements in Management Pack for SQL Server

Features and Enhancements in Management Pack for SQL Server Analysis Services

Features and Enhancements in Management Pack for SQL Server Reporting Services

 

6 Comments
Senior Member

After importing the SQL Server management pack, we are receiving the following alert on each monitored instance:

 

Management Group: "xxx"
Module: Microsoft.SQLServer.Windows.Module.Discovery.Discoveries.AgentJobDiscovery
Version: 7.0.32.0

Error(s) was(were) occurred:
Message: An error occurred during discovery.


---------- Exception: ----------
Exception Type: System.Data.SqlClient.SqlException
Message: The EXECUTE permission was denied on the object 'SQLAGENT_SUSER_SNAME', database 'msdb', schema 'dbo'.
Number: 229
Source: .Net SqlClient Data Provider
Stack Trace: 
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, String endMethod, Boolean isInternal)
at System.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandDataReaderInternalAsync>d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandDataReaderAsync>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Windows.Module.Discovery.Discoveries.AgentJobDiscovery.<FillListsOfClassesAndRelationsAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Module.Helper.Base.DataItemHelper.<GetDiscoveryDataAsyncStatic>d__6.MoveNext()


State:
The configuration properties are: 
ManagementGroupName = xxx
Publisher = SQLDiscoveryWindows
ConnectionString = xxx.xxx.com\YYY
InstanceEdition = xxx
InstanceName = YYY
InstanceVersion = 14.0.3381.3
MachineName = xxx.xxx.com
MonitoringType = Local
NetbiosComputerName = xxx
Login = 
AgentJobClassId = 36047f61-8a87-3d85-2de3-d423c71828da
DiscoverySourceManagedEntityId = d58c3a70-6c31-c715-4e61-5511294ff713
DiscoverySourceObjectId = e247a519-1261-4cc5-5d13-f7734304b621
ExcludeList = 
LocalAgentJobClassId = c18cd1df-7c26-0bdc-f07d-749d86afaf83
SqlTimeoutSeconds = 15
TimeoutSeconds = 300
Password = ********

Error(s):
An error occurred during discovery.


---------- Exception: ----------
Exception Type: System.Data.SqlClient.SqlException
Message: The EXECUTE permission was denied on the object 'SQLAGENT_SUSER_SNAME', database 'msdb', schema 'dbo'.
Number: 229
Source: .Net SqlClient Data Provider
Stack Trace: 
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean isInternal, Boolean forDescribeParameterEncryption)
at System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, String endMethod, Boolean isInternal)
at System.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult asyncResult)
at System.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult asyncResult)
at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandDataReaderInternalAsync>d__40.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.<ExecuteCommandDataReaderAsync>d__35.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Windows.Module.Discovery.Discoveries.AgentJobDiscovery.<FillListsOfClassesAndRelationsAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.SQLServer.Module.Helper.Base.DataItemHelper.<GetDiscoveryDataAsyncStatic>d__6.MoveNext()

Are there additional permissions required in a low privilege environment? Based on the following script, we already have these grants and role memberships in place for the action account:

 

Low-privilege monitoring in Management Pack for SQL Server | Microsoft Docs

The above output is from SQL Server 2014, however this appears to be affecting multiple versions of SQL Server. 

Senior Member

This appears to be the query causing the permission denied error:

exec sp_executesql N'DECLARE @xml xml = @excludeList
;WITH excludeList
AS
(
	SELECT T.db.value(''(./@name)[1]'', ''nvarchar(max)'') AS jobName
	FROM @xml.nodes(''ExcludeList/AgentJob'') AS T(db)
)
SELECT sjv.job_id,
		sjv.name,
		sjv.originating_server,
		sjv.description,
		category = ISNULL(sc.name, FORMATMESSAGE(14205)),
		owner = msdb.dbo.SQLAGENT_SUSER_SNAME(sjv.owner_sid),
		sjv.enabled
FROM msdb.dbo.sysjobs_view sjv
		JOIN msdb.dbo.syscategories sc 
			ON (sjv.category_id = sc.category_id)
		left JOIN excludeList el
			ON ( el.jobName LIKE ''%*%'' and sjv.name = el.jobName)
			or sjv.name LIKE REPLACE(REPLACE(REPLACE(REPLACE(el.jobName, ''%'', ''[%]''), ''['', ''[[]''), ''_'', ''[_]''), ''*'', ''%'')
		where el.jobName is null
ORDER BY sjv.job_id;',N'@excludeList nvarchar(15)',@excludeList=N'<ExcludeList />'
Senior Member

@smilne Hello Stewart, let's discuss this by email if you don't mind.

Occasional Visitor

@DVKalashnikov @smilne I am getting same issue. Please let me know if we can report this issue.

 

Senior Member

Hi @Swati06, you could observe this issue when monitoring your environment under low privilege access. To workaround it, additional grants for the monitoring account should be granted. Please use this instruction, replacing the [LowPrivAccount] for your SQL account name:
1) Open SQL Server Management Studio and connect to the SQL Server Database Engine instance.
2) Give additional grants for the [LowPrivAccount] SQL account:

USE [msdb]
GO
GRANT EXECUTE ON SQLAGENT_SUSER_SNAME TO [LowPrivAccount]
GRANT SELECT ON sysjobs_view TO [LowPrivAccount]
GRANT SELECT ON syscategories TO [LowPrivAccount]
Occasional Visitor

@DVKalashnikov Thank you for the quick response. I hope Microsoft will publish this soon.

%3CLINGO-SUB%20id%3D%22lingo-sub-2496096%22%20slang%3D%22en-US%22%3EReleased%3A%20SCOM%20Management%20Packs%20for%20SQL%20Server%2C%20Reporting%20Services%2C%20Analysis%20Services%20(7.0.32.0)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2496096%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20size%3D%224%22%3EUpdates%20to%20SQL%20Server%2C%20Reporting%20Services%2C%20and%20Analysis%20Services%20Management%20Packs%20are%20available%20(7.0.32.0).%20We%20also%20released%20an%20update%20to%20SQL%20Server%20Dashboards%20MP.%20You%20can%20download%20the%20MPs%20from%20the%20links%20below.%20Majority%20of%20the%20changes%20are%20based%20on%20your%20direct%20feedback.%20Thank%20you.%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D56203%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20System%20Center%20Management%20Pack%20for%20SQL%20Server%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D57381%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20System%20Center%20Management%20Pack%20for%20SQL%20Server%20Reporting%20Services%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D57382%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20System%20Center%20Management%20Pack%20for%20SQL%20Server%20Analysis%20Services%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%20style%3D%22margin%3A%200in%3B%20font-family%3A%20Calibri%3B%20font-size%3A%2011.0pt%3B%22%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22http%3A%2F%2Fwww.microsoft.com%2Fdownloads%2Fdetails.aspx%3FFamilyID%3D4a335cd3-8653-4dbb-ba0e-3320ea903f6f%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EMicrosoft%20System%20Center%20Management%20Pack%20for%20SQL%20Server%20Dashboards%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3EAnother%20change%20we've%20done%20recently%20is%20to%20move%20operations%20guides%20for%20all%20SQL%20Server%20family%20of%20management%20packs%20from%20download%20center%20to%20docs.microsoft.com.%20This%20unifies%20the%20content%20viewing%20experience%20for%20the%20user%20as%20the%20rest%20of%20the%20SCOM%20and%20SQL%20Server%20documentation%20is%20already%20there.%20Further%20more%2C%20it%20allows%20us%20to%20present%20you%20with%20the%20most%20up%20to%20date%20and%20accurate%20content%20online.%20The%20link%20to%20the%20operation%20guide%20for%20each%20MP%20can%20be%20found%20on%20the%20MP%20download%20page.%20Here%20are%20the%20links%20that%20show%20what's%20new%20in%20these%20MPs%3A%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsystem-center%2Fscom%2Fsql-server-management-pack-changes-history%3Fview%3Dsc-om-2019%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EFeatures%20and%20Enhancements%20in%20Management%20Pack%20for%20SQL%20Server%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsystem-center%2Fscom%2Fanalysis-services-management-pack-changes-history%3Fview%3Dsc-om-2019%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EFeatures%20and%20Enhancements%20in%20Management%20Pack%20for%20SQL%20Server%20Analysis%20Services%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20size%3D%224%22%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsystem-center%2Fscom%2Freporting-services-management-pack-changes-history%3Fview%3Dsc-om-2019%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EFeatures%20and%20Enhancements%20in%20Management%20Pack%20for%20SQL%20Server%20Reporting%20Services%3C%2FA%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-2496096%22%20slang%3D%22en-US%22%3E%3CP%3E%3CFONT%20size%3D%224%22%3EUpdates%20to%20SQL%20Server%2C%20Reporting%20Services%2C%20and%20Analysis%20Services%20Management%20Packs%20are%20available%20(7.0.32.0).%20We%20also%20released%20an%20update%20to%20SQL%20Server%20Dashboards%20MP.%20You%20can%20download%20the%20MPs%20from%20the%20links%20below.%20Majority%20of%20the%20changes%20are%20based%20on%20your%20direct%20feedback.%20Thank%20you.%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2496096%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESQLReleases%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2521885%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20SCOM%20Management%20Packs%20for%20SQL%20Server%2C%20Reporting%20Services%2C%20Analysis%20Services%20(7.0.32.0)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2521885%22%20slang%3D%22en-US%22%3E%3CP%3EAfter%20importing%20the%20SQL%20Server%20management%20pack%2C%20we%20are%20receiving%20the%20following%20alert%20on%20each%20monitored%20instance%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3EManagement%20Group%3A%20%22xxx%22%0AModule%3A%20Microsoft.SQLServer.Windows.Module.Discovery.Discoveries.AgentJobDiscovery%0AVersion%3A%207.0.32.0%0A%0AError(s)%20was(were)%20occurred%3A%0AMessage%3A%20An%20error%20occurred%20during%20discovery.%0A%0A%0A----------%20Exception%3A%20----------%0AException%20Type%3A%20System.Data.SqlClient.SqlException%0AMessage%3A%20The%20EXECUTE%20permission%20was%20denied%20on%20the%20object%20'SQLAGENT_SUSER_SNAME'%2C%20database%20'msdb'%2C%20schema%20'dbo'.%0ANumber%3A%20229%0ASource%3A%20.Net%20SqlClient%20Data%20Provider%0AStack%20Trace%3A%20%0Aat%20System.Data.SqlClient.SqlConnection.OnError(SqlException%20exception%2C%20Boolean%20breakConnection%2C%20Action%601%20wrapCloseInAction)%0Aat%20System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject%20stateObj%2C%20Boolean%20callerHasConnectionLock%2C%20Boolean%20asyncClose)%0Aat%20System.Data.SqlClient.TdsParser.TryRun(RunBehavior%20runBehavior%2C%20SqlCommand%20cmdHandler%2C%20SqlDataReader%20dataStream%2C%20BulkCopySimpleResultSet%20bulkCopyHandler%2C%20TdsParserStateObject%20stateObj%2C%20Boolean%26amp%3B%20dataReady)%0Aat%20System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()%0Aat%20System.Data.SqlClient.SqlDataReader.get_MetaData()%0Aat%20System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader%20ds%2C%20RunBehavior%20runBehavior%2C%20String%20resetOptionsString%2C%20Boolean%20isInternal%2C%20Boolean%20forDescribeParameterEncryption%2C%20Boolean%20shouldCacheForAlwaysEncrypted)%0Aat%20System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean%20isInternal%2C%20Boolean%20forDescribeParameterEncryption)%0Aat%20System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult%20asyncResult%2C%20String%20endMethod%2C%20Boolean%20isInternal)%0Aat%20System.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult%20asyncResult)%0Aat%20System.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult%20asyncResult)%0Aat%20System.Threading.Tasks.TaskFactory%601.FromAsyncCoreLogic(IAsyncResult%20iar%2C%20Func%602%20endFunction%2C%20Action%601%20endAction%2C%20Task%601%20promise%2C%20Boolean%20requiresSynchronization)%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.%26lt%3BExecuteCommandDataReaderInternalAsync%26gt%3Bd__40.MoveNext()%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.%26lt%3BExecuteCommandDataReaderAsync%26gt%3Bd__35.MoveNext()%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Windows.Module.Discovery.Discoveries.AgentJobDiscovery.%26lt%3BFillListsOfClassesAndRelationsAsync%26gt%3Bd__13.MoveNext()%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Module.Helper.Base.DataItemHelper.%26lt%3BGetDiscoveryDataAsyncStatic%26gt%3Bd__6.MoveNext()%0A%0A%0AState%3A%0AThe%20configuration%20properties%20are%3A%20%0AManagementGroupName%20%3D%20xxx%0APublisher%20%3D%20SQLDiscoveryWindows%0AConnectionString%20%3D%20xxx.xxx.com%5CYYY%0AInstanceEdition%20%3D%20xxx%0AInstanceName%20%3D%20YYY%0AInstanceVersion%20%3D%2014.0.3381.3%0AMachineName%20%3D%20xxx.xxx.com%0AMonitoringType%20%3D%20Local%0ANetbiosComputerName%20%3D%20xxx%0ALogin%20%3D%20%0AAgentJobClassId%20%3D%2036047f61-8a87-3d85-2de3-d423c71828da%0ADiscoverySourceManagedEntityId%20%3D%20d58c3a70-6c31-c715-4e61-5511294ff713%0ADiscoverySourceObjectId%20%3D%20e247a519-1261-4cc5-5d13-f7734304b621%0AExcludeList%20%3D%20%0ALocalAgentJobClassId%20%3D%20c18cd1df-7c26-0bdc-f07d-749d86afaf83%0ASqlTimeoutSeconds%20%3D%2015%0ATimeoutSeconds%20%3D%20300%0APassword%20%3D%20********%0A%0AError(s)%3A%0AAn%20error%20occurred%20during%20discovery.%0A%0A%0A----------%20Exception%3A%20----------%0AException%20Type%3A%20System.Data.SqlClient.SqlException%0AMessage%3A%20The%20EXECUTE%20permission%20was%20denied%20on%20the%20object%20'SQLAGENT_SUSER_SNAME'%2C%20database%20'msdb'%2C%20schema%20'dbo'.%0ANumber%3A%20229%0ASource%3A%20.Net%20SqlClient%20Data%20Provider%0AStack%20Trace%3A%20%0Aat%20System.Data.SqlClient.SqlConnection.OnError(SqlException%20exception%2C%20Boolean%20breakConnection%2C%20Action%601%20wrapCloseInAction)%0Aat%20System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject%20stateObj%2C%20Boolean%20callerHasConnectionLock%2C%20Boolean%20asyncClose)%0Aat%20System.Data.SqlClient.TdsParser.TryRun(RunBehavior%20runBehavior%2C%20SqlCommand%20cmdHandler%2C%20SqlDataReader%20dataStream%2C%20BulkCopySimpleResultSet%20bulkCopyHandler%2C%20TdsParserStateObject%20stateObj%2C%20Boolean%26amp%3B%20dataReady)%0Aat%20System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()%0Aat%20System.Data.SqlClient.SqlDataReader.get_MetaData()%0Aat%20System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader%20ds%2C%20RunBehavior%20runBehavior%2C%20String%20resetOptionsString%2C%20Boolean%20isInternal%2C%20Boolean%20forDescribeParameterEncryption%2C%20Boolean%20shouldCacheForAlwaysEncrypted)%0Aat%20System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader(Boolean%20isInternal%2C%20Boolean%20forDescribeParameterEncryption)%0Aat%20System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult%20asyncResult%2C%20String%20endMethod%2C%20Boolean%20isInternal)%0Aat%20System.Data.SqlClient.SqlCommand.EndExecuteReaderInternal(IAsyncResult%20asyncResult)%0Aat%20System.Data.SqlClient.SqlCommand.EndExecuteReaderAsync(IAsyncResult%20asyncResult)%0Aat%20System.Threading.Tasks.TaskFactory%601.FromAsyncCoreLogic(IAsyncResult%20iar%2C%20Func%602%20endFunction%2C%20Action%601%20endAction%2C%20Task%601%20promise%2C%20Boolean%20requiresSynchronization)%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.%26lt%3BExecuteCommandDataReaderInternalAsync%26gt%3Bd__40.MoveNext()%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Module.Helper.TransientErrorHandling.SqlRetryClient.%26lt%3BExecuteCommandDataReaderAsync%26gt%3Bd__35.MoveNext()%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Windows.Module.Discovery.Discoveries.AgentJobDiscovery.%26lt%3BFillListsOfClassesAndRelationsAsync%26gt%3Bd__13.MoveNext()%0A---%20End%20of%20stack%20trace%20from%20previous%20location%20where%20exception%20was%20thrown%20---%0Aat%20System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()%0Aat%20System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task%20task)%0Aat%20Microsoft.SQLServer.Module.Helper.Base.DataItemHelper.%26lt%3BGetDiscoveryDataAsyncStatic%26gt%3Bd__6.MoveNext()%0A%0A%3C%2FPRE%3E%3CP%3EAre%20there%20additional%20permissions%20required%20in%20a%20low%20privilege%20environment%3F%20Based%20on%20the%20following%20script%2C%20we%20already%20have%20these%20grants%20and%20role%20memberships%20in%20place%20for%20the%20action%20account%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fsystem-center%2Fscom%2Fsql-server-management-pack-low-privilege-monitoring%3Fview%3Dsc-om-2019%23on-sql-server-instances%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3ELow-privilege%20monitoring%20in%20Management%20Pack%20for%20SQL%20Server%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2521906%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20SCOM%20Management%20Packs%20for%20SQL%20Server%2C%20Reporting%20Services%2C%20Analysis%20Services%20(7.0.32.0)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2521906%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20appears%20to%20be%20the%20query%20causing%20the%20permission%20denied%20error%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CPRE%3Eexec%20sp_executesql%20N'DECLARE%20%40xml%20xml%20%3D%20%40excludeList%0A%3BWITH%20excludeList%0AAS%0A(%0A%20SELECT%20T.db.value(''(.%2F%40name)%5B1%5D''%2C%20''nvarchar(max)'')%20AS%20jobName%0A%20FROM%20%40xml.nodes(''ExcludeList%2FAgentJob'')%20AS%20T(db)%0A)%0ASELECT%20sjv.job_id%2C%0A%20%20sjv.name%2C%0A%20%20sjv.originating_server%2C%0A%20%20sjv.description%2C%0A%20%20category%20%3D%20ISNULL(sc.name%2C%20FORMATMESSAGE(14205))%2C%0A%20%20owner%20%3D%20msdb.dbo.SQLAGENT_SUSER_SNAME(sjv.owner_sid)%2C%0A%20%20sjv.enabled%0AFROM%20msdb.dbo.sysjobs_view%20sjv%0A%20%20JOIN%20msdb.dbo.syscategories%20sc%20%0A%20%20%20ON%20(sjv.category_id%20%3D%20sc.category_id)%0A%20%20left%20JOIN%20excludeList%20el%0A%20%20%20ON%20(%20el.jobName%20LIKE%20''%25*%25''%20and%20sjv.name%20%3D%20el.jobName)%0A%20%20%20or%20sjv.name%20LIKE%20REPLACE(REPLACE(REPLACE(REPLACE(el.jobName%2C%20''%25''%2C%20''%5B%25%5D'')%2C%20''%5B''%2C%20''%5B%5B%5D'')%2C%20''_''%2C%20''%5B_%5D'')%2C%20''*''%2C%20''%25'')%0A%20%20where%20el.jobName%20is%20null%0AORDER%20BY%20sjv.job_id%3B'%2CN'%40excludeList%20nvarchar(15)'%2C%40excludeList%3DN'%26lt%3BExcludeList%20%2F%26gt%3B'%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2531037%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20SCOM%20Management%20Packs%20for%20SQL%20Server%2C%20Reporting%20Services%2C%20Analysis%20Services%20(7.0.32.0)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2531037%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F470337%22%20target%3D%22_blank%22%3E%40smilne%3C%2FA%3E%26nbsp%3BHello%20Stewart%2C%20let's%20discuss%20this%20by%20email%20if%20you%20don't%20mind.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2546962%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20SCOM%20Management%20Packs%20for%20SQL%20Server%2C%20Reporting%20Services%2C%20Analysis%20Services%20(7.0.32.0)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2546962%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F325016%22%20target%3D%22_blank%22%3E%40DVKalashnikov%3C%2FA%3E%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F470337%22%20target%3D%22_blank%22%3E%40smilne%3C%2FA%3E%26nbsp%3BI%20am%20getting%20same%20issue.%20Please%20let%20me%20know%20if%20we%20can%20report%20this%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2546998%22%20slang%3D%22en-US%22%3ERe%3A%20Released%3A%20SCOM%20Management%20Packs%20for%20SQL%20Server%2C%20Reporting%20Services%2C%20Analysis%20Services%20(7.0.32.0)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2546998%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F271739%22%20target%3D%22_blank%22%3E%40Swati06%3C%2FA%3E%2C%20you%20could%20observe%20this%20issue%20when%20monitoring%20your%20environment%20under%20low%20privilege%20access.%20To%20workaround%20it%2C%20additional%20grants%20for%20the%20monitoring%20account%20should%20be%20granted.%20Please%20use%20this%20instruction%2C%20replacing%20the%20%5BLowPrivAccount%5D%20for%20your%20SQL%20account%20name%3A%3CBR%20%2F%3E1)%20Open%20SQL%20Server%20Management%20Studio%20and%20connect%20to%20the%20SQL%20Server%20Database%20Engine%20instance.%3CBR%20%2F%3E2)%20Give%20additional%20grants%20for%20the%20%5BLowPrivAccount%5D%20SQL%20account%3A%3C%2FP%3E%3CPRE%3EUSE%20%5Bmsdb%5D%0AGO%0AGRANT%20EXECUTE%20ON%20SQLAGENT_SUSER_SNAME%20TO%20%5BLowPrivAccount%5D%0AGRANT%20SELECT%20ON%20sysjobs_view%20TO%20%5BLowPrivAccount%5D%0AGRANT%20SELECT%20ON%20syscategories%20TO%20%5BLowPrivAccount%5D%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Co-Authors
Version history
Last update:
‎Jun 29 2021 02:16 AM
Updated by: