Views:

Issue

You try to rebuild the Datamart database and it fails. When you review the Deployment Logs, within you find a message that resembles the following:

Retrying service call due to exception with 1 retries left.    The integration you're trying to create already exists.    Action: InvalidOperationException    Fault code: Sender    IsSenderFault: True    IsReceiverFault: False    Reason: The integration you're trying to create already exists.

Additionally, when you open SQL Management Studio you find the Datamart database that you tried to rebuild is in Single User mode.

Cause: 

The previous integration was not removed from the ManagementReporter database.

Resolution:

To resolve this issue:

1. Stop the Management Reporter Services

2. In SQL Management Studio, delete the Datamart database that is in single user mode.

3. Restart the Management Reporter services

4. Run the below against the ManagementReporter database:


Alter table [Connector].[Integration] DISABLE trigger ALL 
Alter table [Connector].[Map] DISABLE trigger ALL 
Alter table [Scheduling].[TaskCategory] DISABLE trigger ALL 
Alter table [Scheduling].[Task] DISABLE trigger ALL 
Alter table [Scheduling].[Trigger] DISABLE trigger ALLDELETE FROM [Connector].[IntegrationGroup] 
DELETE FROM [Connector].[Map] WHERE [MapId] IN (SELECT [Id] FROM [Scheduling].[Task] WHERE [CategoryId] IN (SELECT [Id] FROM [Scheduling].[TaskCategory] WHERE [ParentId] IN (SELECT [Id] FROM [Scheduling].[TaskCategory] where ParentID is null))); 

DELETE FROM [Connector].[MapDefinition] WHERE [DefinitionId] NOT IN (SELECT DISTINCT DefinitionId FROM Connector.Map)

DELETE FROM [Scheduling].[Task] WHERE [CategoryId] not IN (SELECT [Id] FROM [Scheduling].[TaskCategory] where ParentID is null) 
DELETE FROM [Scheduling].[Trigger] where Id NOT IN (SELECT distinct TriggerId from [Scheduling].[Task]) 
DELETE FROM [Connector].[MapCategoryAdapterSettings]

Alter table [Connector].[Integration] ENABLE trigger ALL 
Alter table [Connector].[Map] ENABLE trigger ALL 
Alter table [Scheduling].[TaskCategory] ENABLE trigger ALL 
Alter table [Scheduling].[Task] ENABLE trigger ALL 
Alter table [Scheduling].[Trigger] ENABLE trigger ALL

DELETE FROM [Connector].[Integration]

DELETE FROM [Scheduling].[TaskCategory]

 

5. In SQL Management Studio, delete the Datamart database that is in single user mode.

6. In the Configuration Console, repeat the steps to create the Datamart database.