Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

Removing an old product connector

Removing an old product connector

  • Comments 8
  • Likes

 

UPDATE 10/4/2011 – This article is now out of date.  There is a KB article with a supported method to delete old product connectors:

http://support.microsoft.com/kb/2626670

Please refer to the article above if you need to remove a connector.  The blog article below is for informational purposes only now.

 

 

 

 

 

 

In OpsMgr – there is no simple way to remove a product connector once installed.  There is no delete function in the UI:

 

image

 

What if you have an old connector that you no longer use?  Or, if you quit using an Engyro connector, and started using a MS branded R2 connector?

It may be necessary to forcibly remove a connector from OpsMgr 2007.

 

*** Note – this process is not officially supported.  There is no officially supported way to remove an old connector.  It is only being demonstrated here for example purposes.  I have used these steps with customers, and thus far no ill effects were discovered.  These steps were gleaned from a MS newsgroup posting.

 

Open SQL Server Management Studio from the Start menu and run the following queries on the Operations Manager database.

 

Step 1: Remove ANY and ALL subscriptions assigned to this connector you wish to delete:

In the UI – open the connector you wish to remove – and delete the Subscriptions that are present.  Make sure these are all removed before you continue or you will have orphaned subscriptions at the end of this process.

 

Step 2: Find the ConnectorID:

select DisplayName,IsInitialized,ConnectorID from Connector,BaseManagedEntity
where Connector.BaseManagedEntityID=BaseManagedEntity.BaseManagedEntityID

This will return 3 Columns: The Display Name, Initialized Flag, and ConnectorID.

Find the ConnectorID of the connector you want to remove.  Copy it to Notepad for safekeeping.

 

Step 3: Un-Initialize the Connector

If the Connector field "IsInitialized" is 1, then you will need to uninitialize the connector before deleting it.

If IsInitialized is 0, skip to step 4.

Use the p_ConnectorUpdate SP to uninitialize the connector:

The first column is YOUR connectorID, 2nd column is the bookmark (this should be NULL), and the 3rd column is the initialized state (0 in our case)

EXEC p_ConnectorUpdate '5fabdf4c-a1f8-43bf-ac18-e46e20bd470b',NULL,0

Make sure this worked – by re-running the initial query, and ensure the connector initialized state is now 0.  DO NOT CONTINUE until this is verified as not initialized.

 

Step 4: Delete the Connector

Use the p_ConnectorDelete SP to delete the connector.

The first parameter is YOUR ConnectorID, the 2nd Parameter is the comments you want added to the alert history when the connector is deleted, and the 3rd parameter is the Modified By field you want added to the alert history. (I use NULL for the optional fields to keep it simple.)

EXEC p_ConnectorDelete '5fabdf4c-a1f8-43bf-ac18-e46e20bd470b',NULL,NULL

 

This procedure can take a long time if there is a lot of data still associated with the connector. Be Patient.

 

 

Now – I need to mention – there is also a very interesting community tool – which was written to manage product connectors.  I have not used it – but it is worth a look:

http://www.systemcentercentral.com/Downloads/DownloadsDetails/tabid/144/IndexID/12581/Default.aspx

 

 

NOW – what if you already ran this delete command – and forgot to delete any subscriptions to the connector FIRST?

 

You will start getting the following events ~every minute on your RMS event log:

 

Log Name:      Operations Manager
Source:        Health Service Modules
Event ID:      11502
Description:
The Microsoft Operations Manager Connector Framework Alert Forwarding module failed to mark an alert for forwarding because the connector the module is configured for no longer exists.
Connector Id: b7a64deb-f7ff-440e-bc30-d08d340dfe8d

Log Name:      Operations Manager
Source:        DataAccessLayer
Event ID:      33333
Description:
Data Access Layer rejected retry on SqlError:
Request: p_AlertSetConnectorId -- (AlertIdList=a2c51250-bd5a-43e5-96cc-158afc5e674d,b46ea1b2-42b5-47cf-ad15-da261ad13e13,d56effac-8c40-4d63-8337-58fdc09d1de1), (ConnectorId=b7a64deb-f7ff-440e-bc30-d08d340dfe8d), (Comments=), (ModifiedBy=Connector Framework Alert Write Action), (RETURN_VALUE=1)
Class: 16
Number: 547
Message: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_Alert_ConnectorId". The conflict occurred in database "OperationsManager", table "dbo.Connector", column 'ConnectorId'.

Log Name:      Operations Manager
Source:        HealthService
Event ID:      4502
Description:
A module of type "Microsoft.EnterpriseManagement.Mom.Modules.McfAlertWriteAction" reported an exception System.Data.SqlClient.SqlException: The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_Alert_ConnectorId". The conflict occurred in database "OperationsManager", table "dbo.Connector", column 'ConnectorId'.
The statement has been terminated.
   <snipped>

 

This is because we have deleted a connector that still had a live subscription associated with it.  We need to go and delete that subscription to clean this up.  The problem is – the connector is gone, so the subscription is no longer available in the UI.

Therefore – we will have to delete it manually.  This subscription (as all subscriptions) is kept in the “Notifications Internal Library” MP.  You need to export that MP to XML.  FIRST MAKE A BACKUP COPY OF THIS FILE IN CASE YOU MESS UP, then open it for editing in Notepad, or your XML editor of choice.

All subscriptions in this MP are kept in the <Monitoring> <Rules> section.  To identify which connector subscription RULE is causing the problem – you can search for the connector ID, from the event 11502 above.  In my example – my connector ID from this event is:  b7a64deb-f7ff-440e-bc30-d08d340dfe8d.

So – I search the XML for that string – and find b7a64deb-f7ff-440e-bc30-d08d340dfe8d in the <WriteActions> section of a specific <Rule>:

<WriteActions>
  <WriteAction ID="WA" TypeID="SystemCenter!Microsoft.SystemCenter.ConnectorFrameworkAlertWriteAction">
    <ConnectorId>{b7a64deb-f7ff-440e-bc30-d08d340dfe8d}</ConnectorId>
  </WriteAction>
</WriteActions>

Good – I have identified the problem.  Now – I need to do two things:

    1. Find the rule ID – to identify the display string associated with it… then delete that display string.
    2. Delete the orphaned subscription rule.

So – I move up in the XML section of this rule – and I find my Rule ID.  (here is mine:)

<Rule ID="ProductConnectorSubscription2850f8e3_afe7_4c36_84d2_ee258bd086eb"

I then search for the part above which I bolded in blue (yours will be different – search for your string)

What this finds – is the display string section of the XML – which maps this GUID ID to the common name that you gave the subscription.  (here is mine:)

<DisplayString ElementID="ProductConnectorSubscription2850f8e3_afe7_4c36_84d2_ee258bd086eb">
  <Name>Process All New Alerts</Name>
</DisplayString>

So – I need to DELETE this section from the XML…. just the section above, from my very specific <DisplayString ElementID="ProductConnectorSubscription2850f8e3<GUID> line, to the very next </DisplayString>.

Next – I need to delete the entire <rule> which contains the subscription we want to remove.  Mine will be from:

<Rule ID="ProductConnectorSubscription<GUID> line to the very next </Rule>

 

When you are happy – you can import this XML MP back into the management group.  It should import with no errors.  If you get an error – you made a mistake when editing the XML.  You can look on the RMS event log for the specific problem – there will be a critical event there if it fails to import.

 

Repeat this process if you deleted multiple connectors but left their subscriptions intact.  You can validate this from looking for 11502 events on your RMS.

Comments
  • Hi, I think you can also use this tool http://www.systemcentercentral.com/Downloads/DownloadsDetails/tabid/144/IndexID/12581/Default.aspx

  • Hi Kevin.

    Good posting. Thanks. Filling a gap here.

  • Thanks.  Needed this!

  • hi kevin,

    i followd the above commands for removing the savion livemap connector, and it worked fine but the problem started is that scom not receiving the data from the managed servers, when i check the event log i am getting the below event. please help.

    Operations Manager has discarded 52 items in management group SCOM, which came from db02.xyz.com.  These items have been discarded because no valid route exists at this time.  This can happen when new devices are added to the topology but the complete topology has not been distributed yet.  The discarded items will be regenerated.

    regards

    azam

  • hi kevin,

    what should be the default status of "IsInitialized" filed for the operations manager internal connector" 0 or 1

    regards

    azam

  • I have 2 Distributed Applications that were associated with LiveMaps that I can't get rid of.

    I followed the steps above to remove the connectors, but still have the 2 Distributed Applications:

    Name: Savision LiveMaps Connector

    Path: Savision LiveMaps Connector

    Name: Savision LiveMaps v4 Connector

    Path: Savision LiveMaps v4 Connector

    Any idea how to delete these?

  • I removed the subscription and run the SQL commands above. In the Interop node the Universal Connector was gone but the 2nd node with it was still there and the following events were seen - 26319 and 33333. I restarted the 3 OpsMgr services and the events stopped but the interop connector was still there and additionally a new Universal Connector had been created with a different ID. Went through the same SQL commands and this time it was fully removed.

    Then deleted the UC MPs and uninstalled the UC from Program Files.

    After that everthing was OK.

  • This was a life saver. I tried doing so with OM2012 powershell and got left in a funk.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs