none
MSSQL 2014: Monitoring failed 7.0.15.0 MP RRS feed

  • Question

  • we have management pack SQL 2014 with version 7.0.15.0

    Event ID: 4201. Management Group: XXX Script: Main Module: CPUUsagePercentDataSource.ps1

    : 7.0.15.0 :

    Error occurred during CPU Usage for SQL Instances data source executing.

    Computer XXXXXXX

    Reason: Cannot add type. There were compilation errors.

    Position:305

    Offset:29

    Detailed error output: Cannot add type. There were compilation errors.

    --------

    (0) : No inputs specified



    (1) : using System;



    --------

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



    (1) : using System;



    --------

    Requested registry access is not allowed.

    --------

    Attempted to perform an unauthorized operation.

    SCOM service account is part of administrators on these SQL machines.


    swapna

    Monday, July 6, 2020 6:03 PM

All replies

  • Hi,

    Please elaborate on what you mean by "SCOM service account is part of administrators on these SQL machines."

    Similar thread here:
    SQL 2014 Error occured during CPU Usage for SQL Instances data source executing

    Make sure the account used to run the SQL Server monitoring workflows has local administrator access on the SQL Server servers.

    Requested registry access is not allowed.

    Attempted to perform an unauthorized operation.

    The above errors suggest that your account does not have sufficient permissions on the SQL Servers.

    Best regards,
    Leon


    Blog: https://thesystemcenterblog.com LinkedIn:

    Monday, July 6, 2020 6:31 PM
  • Hi Swapna,

    Research and find a similar issue.  It mentioned there is a known issue that Performance collection may fail on operating systems with localized (non-English) names of performance counters. Please check it meets our situation and try the suggestion in the following link to see if it can be ficed.

    https://social.technet.microsoft.com/Forums/en-US/28a6e229-0748-4b4e-a98f-a4dc4b38b62a/sql-2014-error-occured-during-cpu-usage-for-sql-instances-data-source-executing?forum=operationsmanagermgmtpacks

    Hope it can help.

    Best regards.

    Crystal


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

    Tuesday, July 7, 2020 1:50 AM
  • 1) with refer to SQL MP Guide

    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.

    2) moreover, the error message

    >>Requested registry access is not allowed.

    --------

    >>Attempted to perform an unauthorized operation.

    Indicate some permission issue.

    You may also refer to SQL MP guide Security configuration section to configure Low-Privilege Environments for monitoring account.

    Roger
    Tuesday, July 7, 2020 2:40 AM
  • thanks i have added the permissions to c:\windows\Temp folder.

    now it pops up another event on same id

    Event ID: 4201. Management Group: XXXX. Script: Main Module: CPUUsagePercentDataSource.ps1 Version: 7.0.15.0 :

    Error occurred during CPU Usage for SQL Instances data source executing.

    Computer:XXXXX

    Reason: Unable to get counter "\Process(sqlservr*)\ID Process": Unable to connect to the specified computer or the computer is offline.

    Position:442

    Offset:9

    Detailed error output: Unable to get counter "\Process(sqlservr*)\ID Process": Unable to connect to the specified computer or the computer is offline.

    --------

    Unable to connect to the specified computer or the computer is offline.

    --------

    Requested registry access is not allowed.

    --------

    Requested registry access is not allowed.

    --------

    Requested registry access is not allowed.

    --------

    Requested registry access is not allowed.

    --------

    Requested registry access is not allowed.

    --------

    Attempted to perform an unauthorized operation.

    i tried to get counter details using power shell they return the value as expected.

    get-counter  "\Process(sqlservr*)\ID Process"
    Timestamp                 CounterSamples                                                                             


    ---------                 --------------                                                                             


    7/7/2020 7:44:57 AM       \\computer\process(sqlservr)\id process :                                           


                              1784                    


    swapna

    Tuesday, July 7, 2020 7:29 AM

  • Reason: Unable to get counter "\Process(sqlservr*)\ID Process": Unable to connect to the specified computer or the computer is offline.

    Detailed error output: Unable to get counter "\Process(sqlservr*)\ID Process": Unable to connect to the specified computer or the computer is offline.

    --------

    Unable to connect to the specified computer or the computer is offline.

    --------

    Requested registry access is not allowed.

    --------

    Attempted to perform an unauthorized operation.

    Read the error messages carefully, make sure the computer is reachable by SCOM, it may be a firewall blocking the connection for example.

    Test that the 5723 (TCP) port is open from the SQL Server to the SCOM management server, you can run the following PowerShell cmdlet from the SQL Server:

    Test-NetConnection -ComputerName "SCOMMS.domain.com" -Port 5723

    Unable to connect to the specified computer or the computer is offline.

    Requested registry access is not allowed.

    Attempted to perform an unauthorized operation.



    Take a closer look at your error messages (bolded above), check that the server is online and reachable by SCOM. The issue can also be WMI related, if the WMI is corrupted you can try rebuilding it.

    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, July 7, 2020 8:58 AM
  • hi

    i am able to connect over rdp

    test-net connection is success

    access is there to c:\windows\temp


    swapna

    Tuesday, July 7, 2020 12:52 PM
  • hi

    i am able to connect over rdp

    test-net connection is success

    access is there to c:\windows\temp

    Which account has access to C:\Windows\Temp?

    Are you sure the right account has access?


    Blog: https://thesystemcenterblog.com LinkedIn:

    Tuesday, July 7, 2020 12:57 PM
  • it scom action account which is mapped for sql as administrator

    swapna

    Wednesday, July 8, 2020 5:35 AM
  • I would suggest you have a look at the SQL Run As Accounts no longer used over here:
    https://kevinholman.com/2016/08/25/sql-mp-run-as-accounts-no-longer-required

    It is also recommended and more secure to configure with the HealthService SID instead of normal service/user accounts.


    Blog: https://thesystemcenterblog.com LinkedIn:

    Wednesday, July 8, 2020 8:55 AM
  • Hello Swapna,

    Agree with Leon, we can try to rebuild the WMI or consider Services SID method to see if it is working.

    Best regards.

    Crystal


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

    Friday, July 10, 2020 3:28 AM