locked
MSSQL 2014 Discovery failure RRS feed

  • Question

  • Hey everyone, 

    I recently upgraded to the 6.6.4 version of the SQL management packs (2005,2008,2012,2014) and am getting some errors that did not exist prior to the upgrade. 

    I'm getting an even 4201 in the event log, 

    *NOTE* I've already run the "mofcomp C:\Program Files (x86)\Microsoft SQL Server\110\Shared\sqlmgmproviderxpsp2up.mof " command and so far no luck. Any help is much appreciated, thanks.

    Management Group: PROD-SCOMMG. Script: Main Module: CPUUsagePercentDataSource.ps1 : 
    Computer Name = 'XXXXXXXXXX' WMI = 'ComputerManagement' Service Name = 'MSSQL$TRUMPF' SQL Instance Name = 'XXXXXXXX'
    Error occured during CPU Usage for SQL Instances data source executing.
    Computer: XXXXXXXXXXX
    Reason: Cannot add type. There were compilation errors. 
    Position:256 
    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\oiironwd.0.cs' could not be found

    (1) : using System;



    • Edited by cwalker80 Tuesday, January 5, 2016 2:43 PM
    Monday, January 4, 2016 7:31 PM

Answers

  • Hi!

    I was just troubleshooting these errors with a customer and it seems (looking at procmon) like the scripts are trying to use the windows temp folder instead of the run-as account's temp. And while a normal account does have read-access to C:\Windows\TEMP\ it cannot delete it's files.

    We added write/delete right to the monitoring account on C:\Windows\TEMP and that seems to have solved it. At least that's how it seems so far.

    Obviously a work-around as the script should be adjusted instead.

    [edit]

    Oh, and we've seen this on more than only SQL 2014 servers.

    • Edited by Samuel Tegenfeldt Friday, February 5, 2016 10:06 AM comment
    • Proposed as answer by Samuel Tegenfeldt Thursday, February 11, 2016 8:13 AM
    • Marked as answer by Yan Li_ Wednesday, March 30, 2016 9:05 AM
    Friday, February 5, 2016 10:04 AM
  • Hello,

    How about adding the runas account into sysadmin group in the SQL server?

    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.

    • Proposed as answer by Yan Li_ Wednesday, January 20, 2016 3:58 AM
    • Marked as answer by Yan Li_ Monday, January 25, 2016 6:26 AM
    Monday, January 11, 2016 9:05 AM

All replies

  • Hello,

    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.

    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.

    Tuesday, January 5, 2016 5:34 AM
  • Yan,

    Thanks for the reply! I tried this resolution and so far no change. I wasn't aware of this bug though so I'll make a note in case it is related to any issues I may run into in the future. 

    Tuesday, January 5, 2016 2:43 PM
  • Hello,

    How about adding the runas account into sysadmin group in the SQL server?

    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.

    • Proposed as answer by Yan Li_ Wednesday, January 20, 2016 3:58 AM
    • Marked as answer by Yan Li_ Monday, January 25, 2016 6:26 AM
    Monday, January 11, 2016 9:05 AM
  • Hi!

    I was just troubleshooting these errors with a customer and it seems (looking at procmon) like the scripts are trying to use the windows temp folder instead of the run-as account's temp. And while a normal account does have read-access to C:\Windows\TEMP\ it cannot delete it's files.

    We added write/delete right to the monitoring account on C:\Windows\TEMP and that seems to have solved it. At least that's how it seems so far.

    Obviously a work-around as the script should be adjusted instead.

    [edit]

    Oh, and we've seen this on more than only SQL 2014 servers.

    • Edited by Samuel Tegenfeldt Friday, February 5, 2016 10:06 AM comment
    • Proposed as answer by Samuel Tegenfeldt Thursday, February 11, 2016 8:13 AM
    • Marked as answer by Yan Li_ Wednesday, March 30, 2016 9:05 AM
    Friday, February 5, 2016 10:04 AM
  • Hello,

    Is there another way to fix this issue or do we still need to add the SQL RunAs service account to the c:\windows\temp  ?

    Wednesday, March 7, 2018 3:40 AM