2017年2月16日 星期四

SCOM got a lot Monitoring failed event 4001 Part 2

SYMPTOMDate and Time: 2017/2/16 下午 04:46:07
Log Name: Operations Manager
Source: Health Service Script
Event Number: 4001
Level: 1
Logging Computer:
User: N/A
 Description:
Management Group: CDIBOPS. Script: Main Module: CPUUsagePercentDataSource.ps1 Version: 6.7.15.0 : Error occured during CPU Usage for SQL Instances data source executing. Computer:HDBSERVER1 Reason: Cannot add type. There were compilation errors. Position:325 Offset:29 Detailed error output: Cannot add type. There were compilation errors. -------- (0) : 未指定輸入 (1) : using System; -------- (0) : 找不到原始程式檔 'C:\Windows\TEMP\zsvypltn.0.cs' (1) : using System; 

CAUSE
There are some known errors to the 6.6.4.0 version of the SQL management packs, and one of them does mention “Cannot add type. Compilation errors occured.”
In a thread on the Technet Forums it was suggested that it has to do with rights, but focusing mainly on the SQL instance. What caught our eyes, however, was the fact that the script is using the
C:\Windows\TEMP folder instead of its private one. And this seems to be because it is using a few .Net components that do some sort of JIT compilation.
We took a quick look using procmon, filtered on C:\Windows\TEMP\ and yes indeed. The monitoring account used is trying to create and delete its temporary files in that very folder.

work-around
The work-around is simple, but cumbersome. Just make sure that the assigned RunAs account have read/write/delete rights on C:\Windows\TEMP.


SCOM got a lot Monitoring failed event 4001

SYMPTOM
Customer is getting access denied for some registry keys from the sql account:
Detailed error output: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Requested registry access is not allowed.
 
CAUSE
The SQLMPLowPriv, SQLDefaultAction account didn;t have the right permissions according to the MP guide.

Solution
I managed to find the reg key that needs permission:
SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Modules
 
Please give permissions on this reg key as this is a requirement from SCOM and should have had access to this key.


2017年2月15日 星期三

Upgrading to SQL 2014: Report Server version mismatch

Symptom
=============
If you have recently upgraded your SQL Server Reporting Services instance from SQL 2012 SP2 to SQL 2014, you may hit the following error message when trying to access your report server:
The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is ‘163’. The expected version is ‘162’. (rsInvalidReportServerDatabase).

Cause
========
As part of a hotfix for SQL 2012 SP2 CU5, a change was made which resulted in a new ReportServer database version. Since this fix was made after the SQL2014 release, if your SQL2012 SP2 server is on CU5 or later, then it will have a higher database version than what SQL2014 RTM expects.

Solution
=========
We are porting the fix in the next cumulative update for SQL 2014, CU7. In order to fix the version mismatch, you should install CU7 or later onto your SQL2014 instance, which will allow the Reporting Services instance to correctly recognize the new database version.

Notes
======
If you have not yet upgraded, you can determine whether you will run into this issue by executing the following query against your ReportServer database:
SELECT MAX([DbVersion]) FROM [dbo].[DBUpgradeHistory]