Happy New Year!
I recently had a problem in my SCOM test environment with a management pack, which already should have been removed, but really wasn’t.
The situation was this:
I tested the Solarwinds Orion Management Pack which also required a connector to be installed on the management server – which makes my skin crawl. After testing this management pack I came to the decision to remove it again. I didn’t like that I should manually add new devices in the connector wizard and it also created alerts with the same name and I could only see the real problem in the description – more shivers over my back. I uninstalled the connector through Add/Remove Programs and deleted the management pack in the console. The problem was that the Solarwinds.Orion.SCOM.Library still stayed in the database. It was not deleted! Strange. Have not seen this before.
So I tried to use PowerShell. I opened up the OpsManager Shell and ran the Remove-SCOMManagementPack cmdlet as shown in this Picture:
But it timed out after 30 minutes.
In the OpsManager event log on the management server I had these events (4508):
Which showed me that the MP really still was alive, but the assemblies of the connector were missing. Sure, because I uninstalled it.
I tried to remove the MP again from the console. It ran and ran and ran and during that I saw that my management servers slowly greyed out.
I checked the event logs and found this event (20034):
My console was fozen and I could only kill it.
I contacted my SQL admin colleague and she found blockings on the database:
After an hour or so, I asked her to kill these tasks. I had no clue how to get this crazy MP out of my environment. I was glad that it was only my test environment – one more reason why I highly recommend to have that!
Then I remembered that I met Vlad last time at MMS. So I contacted him and he was so kind to forward my request to his colleagues. They helped me out. Here is what I had to do:
I opened up SQL Server Management Studio on my SCOM DB Server
- I performed a backup of my OperationsManager database
- Then I ran the following query to get the ManagementPackId:
where MPName like ‘Solarwinds%’
- Then I ran this query:
exec [dbo].[p_ManagementPackRemove] ‘ManagementPackId‘
This still took 45 min to finish but it worked!
Be careful with this solution because it is not officially supported from Microsoft and don’t forget to perform the backup before running the queries. I also would recommend to do this out of normal Business hours if you Need to run it on a production Environment because it influences the management Server Performance.