web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Problem upgrading organization from 8.1 to 9.1 on OnPremise Dynamics CRM

(0) ShareShare
ReportReport
Posted on by 15

Hello,

We have a technical problem to upgrade our onPremise Dynamics CRM

We have an organization on Dynamics CRM 2016 (version 8.1.1.1005) that we want to migrate to a Dynamics CRM 365 (version 9.1.13.12).

  • This organization runs on 3 environments (Dev / Preprod / Prod) and has exactly the same structure (same solutions / customizations / etc.) on all environments.
    The only 2 differences between these environments are:
  • Dev and Preprod versions have very little data compared to the prod which is very large (almost 500 million audit lines / 32 million activities / ...)
    Prod version runs on an “Enterprise” version of SQL Server

To import the organizations, we make a backup of the database of the organization to be migrated and we restore it on a new SQL server.
Then we import it into Dynamics CRM 365 which we have just installed on a new server
The import of the organization on Dynamics 365 went very well on the Dev and the Preprod and they are now functional.

On the other hand, we have an error with each attempt to import the production organization and it is impossible for us to import it so far.
The error is the same on each attempt. About 30 minutes after starting the import, we arrive at the "PackageDeployer: Starting SolutionHistoryAPIs install." step, and at this point, the import remains blocked for 1 hour precisely and then displays a timeout before failing:

2023-01-09 10:34:20.296| Info| PackageDeployer: Starting SolutionHistoryAPIs install.
2023-01-09 10:34:20.296| Info| PackageDeployer: Starting SolutionHistoryAPIs install with RuntimeSettings: GeoName=ONP|OperationType=Upgrade|OrgSchemaType=CRM|OriginalDBVersion=8.1.1.1005|CurrentDBVersion=9.1.13.12|IsUpgrade=True|ExternalStorageFcb=False|FileTypeFcb=True
2023-01-09 11:34:23.214| Info| Failed to install package SolutionHistoryAPIs on attempt 1.
2023-01-09 11:34:23.214| Info| Failed to install SolutionHistoryAPIsException: Microsoft.Crm.PackageDeployment.PackageDeployerException: Package SolutionHistoryAPIs failed to install on attempt 0.
System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
at System.Threading.Tasks.Task.Execute()<---


During this hour when the import remains blocked, I took the opportunity to look at what was happening on the database.
A query (executed by the MSCRMMicrosoft.Crm.MultiTenantPackageDeploymentExecutor application) remains locked (LCK_M_SCH_S):

IF EXISTS (SELECT * FROM sys.tables WHERE NAME = N'MetadataTimestamp' and type = N'U')
BEGIN
SELECT 1 as DoesExist
END
ELSE
BEGIN
SELECT 0 as DoesExist
END

With a "Wait Resource" that has this value:

metadatalock subresource=ALL_AUDIT_SPECIFICATIONS_AND_ACTIONS classid=database_id = 15 dbid= 15 lock Partition=0 id=lock 1e776796c00 mode=Sch-M

If I kill the locked query, it always returns directly to lock.
In normal times (Not during an import), I tried to execute this query "by hand" and it executes without problem instantly.

I tried various things before retrying the import:

  • Added RAM on the SQL Server (There is now 128GB)
  • Downgrade the CRM version from 9.1.14 to 9.1.13 (Because it is on this version 9.1.13 that the preprod and dev organizations had been successfully imported)
  • Creation of registry keys at CRM level (OLEDBTimeout and ExtendedTimeout) to increase SQL timeouts (learn.microsoft.com/.../a-time-out-occurs-when-importing-large-customization-files)
  • Optimization of the database before the backup/restore with a rebuild of all the indexes of the large tables.

Despite all this, we still have this same error when importing the organization.

Do you have any ideas to solve this problem?

Thanks for your help.

I have the same question (0)
  • Thomas P. Profile Picture
    15 on at

    Does anyone have any ideas?

  • Suggested answer
    Pedro Cadavez de Freitas Profile Picture
    Microsoft Employee on at

    Hello Thomas P. ,

    Hope you are well.

    First concern is that we state on documentation that an Upgrade to v9 should be perform on a DB on latest v8.2.

    learn.microsoft.com/.../upgrade-an-organization

    So an upgrade form 8.1.1 is not supported.

    Other than that, we have rarely seen these contexts where a rather small solution timeouts at 60mins.

    From all the situations, it was always a server  or dynamics 365 files "corruption".

    Did you try to upgrade any other org using that same dynamics 365 server?

    In any case, you should focus on topic 1.

    Let us know your thoughts!

  • Thomas P. Profile Picture
    15 on at

    Hello Pedro,

    Thank you so much for your answer.

    First, it's not a server or dynamics 365 files "corruption" because I already succeed to import our preprod organization on these prod servers.

    As suggested, we will try to update our production environment into the 8.2.28.11 version before trying to import it again into our new 9.1 CRM installation.

    I will let you know.

    Thank you !

  • Thomas P. Profile Picture
    15 on at

    Hello Pedro Cadavez de Freitas ,

    So we have updated our production organization on 8.2.28.11 version and this update is ok with no problem.

    Then I just tryed to import this organization on our Dynamics CRM 365 (9.1.15.32) and we got exactly the same error than before :-/

    2023-01-30 13:04:05.880| Info| PackageDeployer: Starting SolutionHistoryAPIs install.
    2023-01-30 13:04:05.880| Info| PackageDeployer: Starting SolutionHistoryAPIs install with RuntimeSettings: GeoName=ONP|OperationType=Upgrade|OrgSchemaType=CRM|OriginalDBVersion=8.2.28.11|CurrentDBVersion=9.1.15.32|IsUpgrade=True|ExternalStorageFcb=False|FileTypeFcb=True
    2023-01-30 14:04:08.573| Info| Failed to install package SolutionHistoryAPIs on attempt 1.
    2023-01-30 14:04:08.589| Info| Failed to install SolutionHistoryAPIsException: Microsoft.Crm.PackageDeployment.PackageDeployerException: Package SolutionHistoryAPIs failed to install on attempt 0.
    System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
    at System.Threading.Tasks.Task.Execute()
    --- End of inner exception stack trace ---
    ---> (Inner Exception #0) Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
    at System.Threading.Tasks.Task.Execute()<---

    ...

    2023-01-30 14:04:08.604| Info| CrmAction execution time; InstallPlatformSolutionsAction; 01:05:19.4309135
    2023-01-30 14:04:08.604| Error| Installer Complete: OrganizationUpgrader - Error encountered
    2023-01-30 14:04:08.620| Error| Exception occurred during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallPlatformSolutionsAction
    InnerException:
    Microsoft.Crm.PackageDeployment.PackageDeployerException: Package SolutionHistoryAPIs failed to install on attempt 0.
    System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
    at System.Threading.Tasks.Task.Execute()
    --- End of inner exception stack trace ---
    ---> (Inner Exception #0) Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
    at System.Threading.Tasks.Task.Execute()<---

    ...

    2023-01-30 14:04:08.635| Info| Changing organization state. New state = Failed, Existing state = Pending
    2023-01-30 14:13:56.674|Verbose| Retrieving database base language code Data Source=***;Initial Catalog=***;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=***.mmc ...
    2023-01-30 14:13:56.675| Info| Database base language code: 1033.
    2023-01-30 14:13:56.753|Verbose| Begin: Check if Solutions for different Org Types are installed for org ba451eff-91ff-e411-80e8-00505689e7b5 using connection Data Source=***;Initial Catalog=***;Integrated Security=True;Enlist=False;Connect Timeout=30;Application Name=MSCRMmmc;Workstation ID=***.mmc
    2023-01-30 14:13:56.753|Verbose| End: Check if CRM Solutions are installed. Solutions found =
    2023-01-30 14:13:56.753| Error| Upgrade Organization with Id=ba451eff-91ff-e411-80e8-00505689e7b5 failed with Exception:
    System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallPlatformSolutionsAction ---> Microsoft.Crm.PackageDeployment.PackageDeployerException: Package SolutionHistoryAPIs failed to install on attempt 0.
    System.AggregateException: One or more errors occurred. ---> Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
    at System.Threading.Tasks.Task.Execute()
    --- End of inner exception stack trace ---
    ---> (Inner Exception #0) Microsoft.Crm.MultiTenantPackageDeployment.PackageDeployerException: MTPD: Import operation timed out.
    at Microsoft.Crm.MultiTenantPackageDeployment.PdExecutor.Process(PackageDeploymentInputArgs input, JobOutput`1 output, CancellationToken ct)
    at System.Threading.Tasks.Task.Execute()<---

    Do you have any ideas of what I can try to import/upgrade this organization on Dynamics CRM 9.1 ?

    Thank you

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 196 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 129

#3
CU11031447-0 Profile Picture

CU11031447-0 100

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans