SCOM 2012 R2 UR7 – Error Running Data Warehouse SQL Script “Invalid object…”

I have been doing SCOM updates for the past few years and I rarely bumped into any issues. If you stick to the recommended procedures, then you will succeed. But recently I bumped into an issue while updating SCOM 2012 R2 UR7. As you know there are installer files which you must run on each SCOM component, in addition you need to run SQL scripts on your backed databases and finally import management packs. The entire procedure is well described here in this support article.

In my case I had to update 2 management servers and both databases OperationsManager and OperationsManagerDW. The installation was brand new and just after adding the last management server, my intension was to install UR7. When I tried to run the SQL script UR_Datawarehouse.sql, the following error appeared…

image

Because I have never faced this problem before, I was quite surprised and started investigating.

I tried to run the script multiple times and the error just slightly changed. If you read the message carefully, you will notice, that there are “objects” missing. In my case vManagedEntityMonitor, Microsoft_SystemCenter_Visualization_Library_
AggregatedPerfValuesForMultipleSeriesGet. The first object is a view and the second a stored procedure which the script is expecting. After some checking for errors I noticed a lot of error events in the OperationsManager event log on each management server. One event I noticed was, that the management server action account (MSAA) could not log on locally to the SCOM servers. Well this is a very bad issue and after checking the management servers in the SCOM console I saw also, that the management servers did not appear healthy, instead they just had the “green circle”. After some more digging, I finally figured out that there was a change in the domain GPO’s which restricted user accounts from log on locally to the servers. I temporarily fixed the issue by adding the SCOM service accounts to the local administrator group of each management server. I know just the SDK account needs local administrator permission on the management servers, but it is just a quick and dirty fix. Soon the error events disappeared and the event log didn’t contain any errors anymore. Few minutes later the management server objects appeared also in a healthy state.

After the management server turned healthy, the expected views and stored procedures appeared in the OperationsManagerDW.

vManagedEntityMonitor:

image
Microsoft_SystemCenter_Visualization_Library_
AggregatedPerfValuesForMultipleSeriesGet:

image

The first time I ran the script, there were more views and stored procedures missing and it seems, that those objects are only fully created after the management servers are in a healthy state. The reason I bumped into this issue was, because of the restricted permissions of the domain user accounts, which prevented to turn the management server into a healthy state and finally creating all the necessary database objects.

I hope this helps!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s