Hi,
I am trying to do an export and import of data between environments.
I used the CMT (DataUtilityTool.exe/CRM Configuration Migration Tool) to make a schemafile,
and I used the "pac data export" command to retrieve the data, but after running for a long time (14:30h ish) and finishing exporting all records, it fails, giving me "datastream is to long" when trying to write to file (highlighted line in picture, it's norwegian):
Maybe I'm abusing the tool with exporting too much, but I tought this was an unexpected error because it is finished exporting all data from the database?
Hello,
I got this error message with Migration Data Utility
someone has encounter this ?
DataMigrationUtility.Export Information 8 27/02/2024 10:52:16 Found 374863 rows for comp_prix entity
DataMigrationUtility.Export Information 8 27/02/2024 10:52:16 Processing Prix rows for 374863 to export stream
DataMigrationUtility.Export Information 8 27/02/2024 10:52:42 Exporting of files is disabled. Skipping
DataMigrationUtility.Export Information 8 27/02/2024 10:52:42 Entity Export Process Complete
DataMigrationUtility.Export Information 8 27/02/2024 10:52:42 Writting output file : C:\WINDOWS\TEMP\5afszgz3.oms\data.xml
DataMigrationUtility.Export Error 2 27/02/2024 10:53:36 Message: Exception Raised when Serializing Microsoft.Xrm.Tooling.Dmt.DataMigCommon.DataModel.Data.entities
Source : mscorlib
Method : CreateStringFromEncoding
Date : 27/02/2024
Time : 10:53:36
Error : Une exception de type 'System.OutOfMemoryException' a été levée.
Stack Trace : Ã System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
à System.Text.UTF8Encoding.GetString(Byte[] bytes, Int32 index, Int32 count)
à Microsoft.Xrm.Tooling.Dmt.DataMigCommon.Utility.Helper.Serialize[T](Object objToSerialize)
======================================================================================================================
DataMigrationUtility.Export Error 2 27/02/2024 10:53:36 Failed to create output file
DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 *********************************************************
DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 Error : No Valid Data Found to export
DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 *********************************************************
DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 ** EXIT EXPORT PROCESS FAIL **
DataMigrationUtility.Export Information 8 27/02/2024 10:53:36 *********************************************************
Here is the command I used:
pac data export -sf .\allCustomComponents.xml -df data.zip -env **** -v
I was running it using a powershell terminal in VS Code and the power platform tool extension.
And I have trusted the folders I'm working in, in VSC. If that helps?
I will try using the full path from root for -sf and -df and using the external powershell as admin.
Try running the cmd prompt (or pshell) as Admin - the folder you're trying to write to might be permission trimmed.
If that doesn't work, make sure you're providing a valid path for the destination file. Remember that the -df parameter expects you to provide the full path to the zip to write, including its filename and extension.
Checked it now, and there was no other usefull information, i included the "--verbose" flag in my command as well. it seams like the entity export process was successful but it cant write it to file.
Your assumption sounds like the same one I'd make. Have you checked the log file to see if there is more useful error messaging there?
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
76
Super User 2025 Season 1
mmbr1606
71
Super User 2025 Season 1