none
SQL 2014 Error occured during CPU Usage for SQL Instances data source executing RRS feed

  • Question

  • Hi,

    I'm getting the following two events error in the Operations Manager Event Log. It's happening almost every minute. Any ideas what to do?

    Thanks!

    Event ID 4201, Source Health Service Script

    ----

    Management Group: mgmnt-group. Script: Main Module: CPUUsagePercentDataSource.ps1 :
    Computer Name = 'SQL01.example.com' Service Name = 'MSSQL$SQL' SQL Instance Name = 'SQL'
    Error occured during CPU Usage for SQL Instances data source executing.
    Computer:SQL01
    Reason: Cannot add type. Compilation errors occurred.
    Position:253
    Offset:21
    Detailed error output: Cannot add type. Compilation errors occurred.
    --------
    (0) : No source files specified

    (1) : using System;

    --------
    (0) : Source file 'C:\Windows\TEMP\p5qpltpa.0.cs' could not be found

    (1) : using System;

    ----

    Management Group: mgmnt-group. Script: main Module: DBDiskLatencyDataSource.ps1 :
    Error occurred during DB Disk Latency data source executing.
    Computer:'SQL01.example.com'
    Reason: Cannot add type. Compilation errors occurred.
    Position:192
    Offset:21
    Instance:SQL
    Detailed error output: Cannot add type. Compilation errors occurred.
    --------
    (0) : No source files specified

    (1) : using System;

    --------
    (0) : Source file 'C:\Windows\TEMP\wm4mntrg.0.cs' could not be found

    (1) : using System;

    Wednesday, March 2, 2016 7:58 AM

Answers

  • Hello,

    Sorry for the late reply. You will find the script within the MP, here is an link which include the script:

    http://systemcentercore.com/?GetElement=Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.DataSource&Type=DataSourceModuleType&ManagementPack=Microsoft.SQLServer.2012.Monitoring&Version=6.5.1.0

    In addition, according to the management pack guide, there is a known issue similar with yours:

    Performance collection may fail on operating systems with localized (non-English) names of performance counters.

    Issue:

    Monitoring workflows may fail to collect performance data when operating system is exposing localized (non-English) names of performance counters and Run As profile is configured to use low-privilege account. An error with Event Id 4001 and reason "Cannot add type. There were compilation error." appears in the Operations Manager event log in such case.

    Resolution:

    Administrative permissions are required to obtain the name of performance counters. Please grant local administrative permissions for account used to run SQL Server monitoring workflows.

    I would like to suggest you try the suggestion above. Please also try to add write/delete right to the monitoring account on C:\Windows\TEMP.

    Regards,

    Yan Li


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 30, 2016 9:09 AM
    Moderator

All replies

  • Hello,

    Whether this issue only happened to your SQL 2014? Which SQL MP do use for SQL monitoring?

    What is the result when you manually run the script on the server with problem?

    I would like to suggest you check whether the runas account was configured well for your SQL monitoring.

    Regards,

    Yan Li


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, March 3, 2016 6:03 AM
    Moderator
  • Thank you for your reply!

    I'm sorry, but where can I find the script?

    I'm using the Microsoft SQL 2014 MP version 6.6.4.0.

    Thursday, March 3, 2016 7:34 AM
  • Hello,

    Sorry for the late reply. You will find the script within the MP, here is an link which include the script:

    http://systemcentercore.com/?GetElement=Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.DataSource&Type=DataSourceModuleType&ManagementPack=Microsoft.SQLServer.2012.Monitoring&Version=6.5.1.0

    In addition, according to the management pack guide, there is a known issue similar with yours:

    Performance collection may fail on operating systems with localized (non-English) names of performance counters.

    Issue:

    Monitoring workflows may fail to collect performance data when operating system is exposing localized (non-English) names of performance counters and Run As profile is configured to use low-privilege account. An error with Event Id 4001 and reason "Cannot add type. There were compilation error." appears in the Operations Manager event log in such case.

    Resolution:

    Administrative permissions are required to obtain the name of performance counters. Please grant local administrative permissions for account used to run SQL Server monitoring workflows.

    I would like to suggest you try the suggestion above. Please also try to add write/delete right to the monitoring account on C:\Windows\TEMP.

    Regards,

    Yan Li


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Wednesday, March 30, 2016 9:09 AM
    Moderator
  • Hello,

    Sorry for the late reply. You will find the script within the MP, here is an link which include the script:

    http://systemcentercore.com/?GetElement=Microsoft.SQLServer.2012.DBEngine.CPUUsagePercent.DataSource&Type=DataSourceModuleType&ManagementPack=Microsoft.SQLServer.2012.Monitoring&Version=6.5.1.0

    In addition, according to the management pack guide, there is a known issue similar with yours:

    Performance collection may fail on operating systems with localized (non-English) names of performance counters.

    Issue:

    Monitoring workflows may fail to collect performance data when operating system is exposing localized (non-English) names of performance counters and Run As profile is configured to use low-privilege account. An error with Event Id 4001 and reason "Cannot add type. There were compilation error." appears in the Operations Manager event log in such case.

    Resolution:

    Administrative permissions are required to obtain the name of performance counters. Please grant local administrative permissions for account used to run SQL Server monitoring workflows.

    I would like to suggest you try the suggestion above. Please also try to add write/delete right to the monitoring account on C:\Windows\TEMP.

    Regards,

    Yan Li


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    This resolved it for me.  We have a low privilege SQL monitoring setup.  I granted the SQLMPLowPriv group modify rights to C:\Windows\Temp on the one server I noticed with this issue.
    • Proposed as answer by SABCENTRAAL Friday, October 27, 2017 7:57 AM
    Tuesday, July 5, 2016 5:18 PM
  • The C:\windows\temp rights aren't needed if you add the account to the local administrator group.

    However, as with any group-membership the runas account needs to "login" again. This will happen automatically, but if you are impatient, just restart the healthservice (Microsoft monitoring agent). 


    Rob Korving
    http://jama00.wordpress.com/

    Thursday, August 10, 2017 2:51 PM