Hi,
I am currently busy creating a Powershell script which automatically builds a development database.
The script pulls the Dynamics NAV 2018 standard objects from a git repository. We have an additional repository for our company's solution which stores the solution as DELTA files.
Now I use the DELTA files against the Dynamics NAV 2018 standard objects and create merged application objects.
All of this works flawlessly, now the time consuming part is kicking in:
I want to import the merged application objects to the database. I tried both variations:
Get-ChildItem $merged_objects | Import-NAVApplicationObject -DatabaseName $target_database -SynchronizeSchemaChanges No
Get-ChildItem $merged_objects | Join-NAVApplicationObject -Destination .\merged_objects.txt -PassThru | Import-NAVApplicationObject -Database $target_database -SynchronizeSchemaChanges No
Both approaches take more than an hour to complete.
Is there any way to speed up this process?
Thank you in advance.
Answers
the problem is caused by Load and unload the Dynamics NAV (Fin.exe) per Object.
A proper Way would be pack all objects to one Dumpfile before importing.
A other proper Way could be to create an import-Agent by object type to make it parallel like this
https://cloudblogs.microsoft.com/dynamics365/no-audience/2014/11/27/how-to-compile-a-database-twice-as-fast-or-faster/