locked
SQL 2016 - Script 'GetSQL2016DBEngineWinServState.js' failed RRS feed

  • Question

  • Afternoon,

    We've recently used Service SIDS to permission the SQL 2016 Databases with low level access.

    I see these script errors occur but I cannot find the root cause

    I looked at the MP Document which specifies the Registry Key Locations and the WMI and added the NT Service\Health Service to these areas.

    Has anyone seen this or know which permission may be required?

    Event ID: 4211. Management Group: TPFGMG. Script: GetSQL2016DBEngineWinServState.js. Version: 6.7.31.0 : ServiceName = MSSQL$DEV; CheckStartupType = true; ServiceUnavailableTime = 900; StartMode = Auto; State = Running
    Script 'GetSQL2016DBEngineWinServState.js' failed.
    Inner exception: 
    Error Number : -2146828218
    Error Code : 70
    Win32 Facility : 10
    Error Description : Permission denied
    Call stack:Exception.constructor(Script 'GetSQL2016DBEngineWinServState.js' failed.,Permission denied
    Error Number : -2146828218
    Error Code : 70
    Win32 Facility : 10
    Error Description : Permission denied
    ),
    Main(MSSQL$DEV,true,900,Auto,Running),
    anonymous(Object),

    *************************************************************

    Event ID: 4211. Management Group: TPFGMG. Script: Main Module: CPUUsagePercentDataSource.ps1 Version: 6.7.31.0 : 
    Error occurred during CPU Usage for SQL Instances data source executing.
    Computer:TPFGSSRST4N04 
    Reason: Exception calling "GetScriptStateKeyPath" with "1" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))" 
    Position:1029 
    Offset:5
    Detailed error output: Exception calling "GetScriptStateKeyPath" with "1" argument(s): "Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))"

    Wednesday, November 22, 2017 2:54 PM

All replies

  • Hello,

    Did you follow the article below to configure Service SID for SQL monitoring?

    https://blogs.technet.microsoft.com/kevinholman/2016/08/25/sql-mp-run-as-accounts-no-longer-required-2/


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

    Thursday, November 23, 2017 8:05 AM
  • Hey,

    you can easily find out where you are missing permissions for the NT Service\Health Service by making a simple ProcMon trace. It is easy:

    - Download ProcessMonitor
    - Run the tool at the time when the probes are done. You can also configure circular logging. 
    - Stop the logging. 
    - Set a filter for access denied and (or) process name

    The toool will show you excactly where you are missing permissions. 

    Regards,


    Stoyan (Please take a moment to "Vote as Helpful" and/or "Mark as Answer" where applicable. This helps the community, keeps the forums tidy, and recognizes useful contributions. Thanks!) Blog: https://blog.pohn.ch/ Twitter: @StoyanChalakov

    • Proposed as answer by Yan Li_ Thursday, November 23, 2017 8:21 AM
    Thursday, November 23, 2017 8:12 AM