
We tried to upgrade our first environment from 8.2 On-premises to 9.1 On-premises and got errors.
Install went fine and imported org fine as part of the install process, but then when we clicked Upgrade Org we got the following error:
10:22:05| Info| CrmAction execution time; UpgradeDatabaseAction; 00:01:04.6766865
10:22:05| Error| Installer Complete: OrganizationUpgrader - Error encountered
10:22:05| Error| Exception occurred during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Error.ActionFailed Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction
InnerException:
Microsoft.Crm.CrmException: Error in Action: Bin\Microsoft.Crm.DataUpgrade.dll:TrackCustomDatabaseObjects on attempt 3. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.Smo, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Did a little research and found someone with the same error suggesting to install these two items:
We did that and reran upgrade process and still got the same error.
Now when we try to reimport the org we a long list of errors about columns that are marked as "inconsistent with Dynamics 365 columns".
example:
tablename: actioncardbase
columnname: recordidobjecttypecode2
remark: deleted column
Hello Allie_B,
Hope you are well.
As you found out, that initial SMO exception is caused by missing SQL 2012 objects as we are still dependent on them.
We never had a scenario that installing them would still trigger the same error so i ask you to double check that you have installed SQL 2012 CLR and Management objects from:
https://www.microsoft.com/en-us/download/details.aspx?id=29065
Still, since you had a failed upgrade attempt, we should avoid retrying an upgrade after failing an upgrade since that can put the DB in an inconsistent state.
I would do the following:
Confirm the installation of SQL 2012 objects above.
Restart server.
Restore DB backup before any upgrade attempt.
Import and upgrade.
Let us know how that works!
Beware also a common problem on upgrading orgs to v9.1
Where you need to provide the deployment admin upgrading the org, privusergroup membership on AD.