Försäljning

Problem updating an 8,0 organization to 8.2

It’s been a bit of tumbleweed here the past couple of months due to me being on paternity leave. In my naive mind I thought that I was going to be able to do some testing and blogging while taking care of a one year old, the truth is you don’t.
Today is my first day at work and I ran into issues right away while updating an 8.0 organization to 8.2. As usual a cryptic error took me on a bit of a hunt to what was needed and I found a solution which may or may not be ideal but it works so far. 

The error message said ”14:41:07|   Info| Setting organization state.  New state = Failed
14:41:07|  Error| Update Organization with Id=84095b00-96bf-e511-80ba-00155d02e703 failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction —> System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object ’dbo.SolutionBase’ with unique index ’ndx_UniqueName’. The duplicate key value is (SnapshotSolution80).
The statement has been terminated.”

Right. Starting search engine power.
The first thing I found was http://kyledoestech.com/updating-crm-2016-to-dynamics-365-fails-with-duplicate-key-error/ which pretty much says, ”restore the org db to a server running 8.1 and update it there, then do an update to 8.2”. I don’t have an 8.1 server available atm so I was hoping I could do something else.

Next stop, Denmark! ”http://crmblog.dk/post/2017/01/03/Dynamics-365-Onpremise-Fejl-ved-opgradering-af-organisation.aspx”
Now, this says that the issue is in the solutionbase table, which the error message says too. There’s a section called solution but I don’t think that the solution is really stated, but I might be misreading it. It did help a little though since I started looking at what was in that table.

This is very much done at your own risk and is unsupported. So far it is working for me but I didn’t have an 8.1 server available so this is a bit of a ”hope this will work”. I would probably not do this to a production organization but this was a test so I thought it was worth a shot.

What I did was to remove the line with SnapshotSolution80 with the command
delete from SolutionBase where SolutionId = ’57A85212-B3B4-4C39-BCB0-5D5EF1F5FFC4′.
It looks like that will be re-inserted and I don’t have a quick way of running the update on a 8.1 server too. After the upgrade there is a line with unique name ”SnapshoySolution80” but with ha different solutionid so hopefully this has been a good dirty fix. So far I haven’t seen any issues with my quick fix but keep in mind this is unsupported.
You could run it towards the uniquiname ”SnapshotSolution80”, which might be a good idea since there COULD be other lines with the same solutionid

Did I mention that this is unsupported

Oh, btw, this is unsuppported.

Rickard Norström
Developer at CRM-Konsulterna

Kontakta oss med dina frågor!

Känner du dig osäker eller är du redo att komma igång? Kontakta oss så svarar vi på alla frågor eller föreslår ett uppstartsmöte där vi går igenom era behov.