Stuck – corrupted index in a managed solution

Sometimes you have these big walls you run into. Today, it was my turn.

In the project I’m working on I finished an user story in which I had to add a new action to one of the products we are building. After having tested the action, it was time to export the solution in order to import it as a managed solution on the target environment.
On the target environment we are building a custom solution for one of our customers. This custom solution requires the action I implemented in the standard product.

I opened up the solutions page in the target environment in order to perform the update on the solution. The import wizard started and ended pretty soon with an exception.

Stuck2

The current version of the product contains a key definition that is too big to be stored as an index on SQL Server (more than 900 bytes). *ouch*

When I look in the already installed managed solution I see that there was a problem creating the keys (Status: Failed). Someone must have overlooked this.

Stuck3

When I try to delete them I get the error message indicating that I cannot remove the key because it is a managed key.

Stuck4

When I try to remove the keys using the object model, I get the same message…

Stuck5

Whatever I do, I’m stuck!

It turns out that in the System tasks, there is actually a large number of failed index creation tasks

Stuck6

I stumbled on an old blog post on MSDN by Gold Coast – dated 29 May 2012 –  in which he described a walkthrough to remove items from a managed solution.
This non-supported walkthrough involved juggling with solutions but finally you were supposed to end up with a fixed environment.

Unfortunately for me this didn’t work out on CRM Online 2015 update 1. The import process stops at the point where it is stacking the managed solutions as there is an error in the existing index definition.

What makes me wonder: How is it possible in the first place that the index was added to CRM. Shouldn’t there have been any verification if the size of the key doesn’t exceed the index width limit in SQL Server?

Some of you probably think: “Big Deal! just uninstall the managed solution and install the updated one”.

Normally I would perfectly agree with you on this matter…  Normally….

But the solution has already been deployed onto 10 different online environments including the production environment (which is containing actual data).

I guess it is time to call Microsoft Support, to see if they can come up with a solution. In the meanwhile we have to look for a way to get rid of the corrupted indexes in a more or less supported way. As soon as we found a solution, I’ll inform you about it.

If anyone of you have a suggestion, please feel free!

I would really appreciate it.

2 thoughts on “Stuck – corrupted index in a managed solution

  1. […] my last article, I mentioned that we got stuck with a corrupted index in a managed solution. The reason the index […]

  2. […] my last article, I mentioned that we got stuck with a corrupted index in a managed solution. The reason the index […]

Leave a Reply

Your email address will not be published. Required fields are marked *