MUI Provisioning failed - Workaround

I got a couple of people leaving comments regarding an error they where encountering while applying a language pack on a supported environment.

They were able to install a MUI (language pack) but were not able to enable it, if any entity has had its form settings edited. When activating the language pack, a SQL error is returned: “Cannot insert duplicate key row in object 'dbo.LocalizedLabel' with unique index ' ndx_LocalizedLabel_ForSingleSelect '.” The error that was shown in the event viewer.

At the time I did not know of a solution, but today I was looking through some things and noticed a comment with the same solution/workaround as what I found. Note that a proper hotfix is being developed.

Before using this workaround, make sure you have the exact same error and situation. If that's the case, make sure you have a backup of your CRM database before you execute the following T-SQL query:

DELETE FROM MetadataSchema.LocalizedLabel WHERE customizationlevel = 2