ERP Software Logo1

Microsoft Dynamics vendors provide comparisons and opinions to professionals in the ERP/Accounting software selection process

 
 

ACE Microtechnology

Management Reporter 2012 DataMart Integration Can’t Be Removed


Email | Print

All of us who struggle with uncooperative DataMarts know the problems they can sometimes have.  One of the tougher issues to encounter include mistakenly deleting the ManagementReporterDM from SQL before removing the Integration.  I have also seen where a client or user deletes the MR Services before removing the Integration.

In these cases, when it appears there is no integration because a user has accidentally not followed the correct steps, which are to:

  1. Open the MR Configuration Console
  2. Disable the Integration
  3. Remove the Integration
  4. Stop the MR Services
  5. Delete the DataMart Database in SSMS
  6. Go back into the Configuration Console
  7. Start the MR Services back up
  8. Choose configure
  9. Configure a new integration by rebuilding the DataMart

**Since there are Dozens of blogs on how to re-build the DataMart, I won't go too much further into the correct steps. 

 

or in some cases followed the correct steps, but the Configuration Console freezes or locks during the removal of the integration, you know that you cannot build another integration while the first one exists.  You also know that you can't see the integration any longer to remove it.  You can, with plenty of time, occasionally, get the integration to show back up.  However, there is another solution to the issue.  Removing the DataMart Integration from the ManagementReporter database.

 

This is NOT recommended to do without having tried to resolve the issue from the MR Configuration Console first.  Be convinced that it cannot be done from the console.

As always, make sure you get a good backup of the ManagementReporter database before following these steps.

Run the following SQL Statements One At A Time against the ManagementReporter database

--1
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 ALL

--2
DELETE 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)
--3
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] WHERE [TaskCategoryId] IN (SELECT [Id] FROM [Scheduling].[TaskCategory] WHERE not [ParentId] is null);

--4
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

--5
DELETE FROM [Connector].[Integration] where type=2

--6
DELETE FROM [Scheduling].[TaskCategory] WHERE [ParentId] IN (SELECT [Id] FROM [Scheduling].[TaskCategory] where ParentID is null);

 

 

Once again, MAKE SURE YOU HAVE A BACKUP BEFORE RUNNING.

Once you have run the sequence once, Run It Again, in order to make sure you get no return on the statements.

After you run this sequence in SSMS, you can open the MR Configuration Console and build your integration for the DataMart.

If you need any assistance, please contact ACE Microtechnology at ACE_GPSupport@AceMicrotech.com

By Jo Ann deRuiter, MCP, Ace Microtechnology

 

One Response to “Management Reporter 2012 DataMart Integration Can’t Be Removed”

  1. iselle says:

    Great article, it helped me resolved my issue!