Error while accessing the connector tab in SCOM




We have recreated the connector in SCOM to forward the alert to ticketing system. But while accessing the connector tab, we are getting the below error.


Application: Operations Manager

Application Version: 7.2.12150.0

Severity: Error


System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.EnterpriseManagement.ConnectorFramework.EnterpriseManagementConnector.Reconnect(EnterpriseManagementGroup managementGroup)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.GetUpdate(IndexTable indexTable, QueryUpdate`1 update, CacheCursor cursor, Range range, Int32 offset, Int32 groupLevel)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.QueryCache`2.GetUpdate(IndexTable indexTable, QueryUpdate`1 update)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.QueryCache`2.GetUpdate(CacheSession session, Boolean fullUpdate)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.QueryCache`2.FireUpdateEvent(CacheSession session, DateTime updateTime, Boolean dataChanged, Boolean fullUpdate, Boolean updatesOnly, IEnumerable queryResult)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.FireUpdateEvents(CacheSession session, Boolean dataChanged, Boolean fullUpdate, ICollection`1 queryResult)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.PostQuery(CacheSession session, IndexTable indexTable, UpdateReason reason, UpdateType updateType, Boolean dataChanged, DateTime queryTime, ICollection`1 queryResult)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.InternalSyncQuery(CacheSession session, IndexTable indexTable, UpdateReason reason, UpdateType updateType)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.InternalQuery(CacheSession session, UpdateReason reason)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Cache.Query`1.TryDoQuery(UpdateReason reason, CacheSession session)

   at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)


So I have run the below PowerShell Query in SCOM Management server.


PS C:\Users\sourav> Get-SCOMConnector | Select Name, ID


I am suspecting that the following ID is might be the issue.



To confirm, I have now run the below SQL queries in SCOM OperationsManager database.


Select * from Connector



Select * from MT_Connector



We could see that the following connector ID doesn’t exist in the table MT_Connector




To fix the issue, we can follow any of the below two action plans. Also please note that before executing any of the below action plan, please make sure you have taken full backup of the SCOM databases.


Action Plan 1:


We can run the below query to remove the orphan connector ID from SCOM.


Get-SCOMConnector -Id 7d03852a-0f31-448b-9af5-822602f3cbf0 | Remove-SCOMConnector


We might get an error like below.


PS C:\Script> Get-SCOMConnector -Id 7d03852a-0f31-448b-9af5-822602f3cbf0 | Remove-SCOMConnector
Remove-SCOMConnector : The connector with the given connector ID is in an incorrect initialized state for the given
operation or does not exist.
At line:1 char:62
+ ... ector -Id 7d03852a-0f31-448b-9af5-822602f3cbf0 | Remove-SCOMConnector
+                                                      ~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : InvalidOperation: (Microsoft.Syste...onnectorCommand:RemoveSCConnectorCommand) [Remove-S
  COMConnector], ConnectorInvalidException
   + FullyQualifiedErrorId : ExecutionError,Microsoft.SystemCenter.OperationsManagerV10.Commands.RemoveSCConnectorCom
PS C:\Script>

It is because column IsInitialized in dbo.connector table has value as true for the connector ID “160ce3c1-40d0-42e7-9f88-f5b75608b25a”


To confirm that, I have run the below PowerShell query in the Management Server.


PS C:\Script> Get-SCOMConnector -Id 7d03852a-0f31-448b-9af5-822602f3cbf0

Name        :

DisplayName :

Description :

Initialized : True



Also we have run the below query in database to double check.


Select * from Connector where ConnectorId = '7d03852a-0f31-448b-9af5-822602f3cbf0'




So, we have now run the following query to update the IsInitialized value to False in the dbo.connector table for the connector ID “160ce3c1-40d0-42e7-9f88-f5b75608b25a”

update Connector

set IsInitialized = 0

where ConnectorId = '7d03852a-0f31-448b-9af5-822602f3cbf0'


Now the above query is completed and updated the column IsInitialized to False in the dbo.connector table for the connector ID “160ce3c1-40d0-42e7-9f88-f5b75608b25a”

Now run the below PowerShell query again and now it is successful,


Get-SCOMConnector -Id 7d03852a-0f31-448b-9af5-822602f3cbf0 | Remove-SCOMConnector


Action Plan 2:


We also can run the below SQL queries to remove the entries from the database.


Delete from Connector where ConnectorId='7D03852A-0F31-448B-9AF5-822602F3CBF0'


While we run the above query, we may have the below error during the delete statement.


So it seems we have an alert where the alert is having a reference for this connector ID.


So we have run the below query to identify the alerts.


Select AlertId, AlertName, ConnectorId from dbo.Alert where ConnectorId = '7D03852A-0F31-448B-9AF5-822602F3CBF0'


So now, we can update the connector information manually or we can wait for alert to be groomed out.


But I will manually update the alert data which is having the reference for the problematic connector and will update the connector ID for connector “Alert Sync:SCOM Alerts Connector”


To update it, we will run the below SQL query.


Update dbo.Alert

set ConnectorId='a50e9177-f3c6-4918-8e1e-0e6bf51e5c79'

where AlertId='18FDCBFC-C111-4AEB-B2B8-9D83435B4513'


Now we will be able to successfully delete the problematic connector.


Delete from Connector where ConnectorId='7D03852A-0F31-448B-9AF5-822602F3CBF0'


Now we can try to access the connector tab and we will be able to see the connectors. Please note that we need to reopen the console.



Issue fixed. I hope this will help you.