Hello, recently we upgraded from 2020 R2 Build 20.208.0031 to 2022 R1 Build 22.109.0023, so in this process we had some custom tables with fields without USR prefix, so we created new fields with USR prefix and published the package, we are able to successfully overcome that issue, we actually followed this link https://www.sprinterra.com/blog/users-fields-in-acumatica-erp-blog-sprinterra/. Now when we are trying to create snapshot we are getting “An error occurred while importing data into the 'AuditHistory' table.” error.
Please have a look at below trace.
Error: An error occurred while importing data into the 'AuditHistory' table. Send
Raised At: 10/1/2022 2:02:14 AM Screen: SM.20.35.20
Details:
10/1/2022 2:02:14 AM Error:
An error occurred while importing data into the 'AuditHistory' table.
System.IO.IOException: Stream was too long.
at System.IO.MemoryStream.Write(ByteI] buffer, Int32 offset, Int32 count)
at System.IO.BufferedStream.Flush()
at PX.DbServices.Points.FileSystem.Adb.AdbWriter.Dispose()
at PX.DbServices.Points.ZipArchive.ZipTableAdapter.WriteRows(IEnumerable`1 rows, Boolean exclusivelly, Action`1 transferObserver)
at PX.BulkInsert.Provider.TransferTableTask.Executor.Start(DataTransferObserver observer)
at PX.BulkInsert.Provider.BatchTransferExecutorSync.RunSingleTask(TransferTableTask task)
PX.Data.PXException: An error occurred while importing data into the 'AuditHistory' table. ---> System.IO.IOException: Stream was too long.
at System.IO.MemoryStream.Write(Byte] buffer, Int32 offset, Int32 count)
at System.IO.BufferedStream.Flush()
at PX.DbServices.Points.FileSystem.Adb.AdbWriter.Dispose()
at PX.DbServices.Points.ZipArchive.ZipTableAdapter.WriteRows(IEnumerable`1 rows, Boolean exclusivelly, Action`1 transferObserver)
at PX.BulkInsert.Provider.TransferTableTask.Executor.Start(DataTransferObserver observer)
at PX.BulkInsert.Provider.BatchTransferExecutorSync.RunSingleTask(TransferTableTask task)
--- End of inner exception stack trace ---
at PX.Data.Update.DtObserver.AskHowToRecoverFromError(Exception ex)
at PX.BulkInsert.Provider.BatchTransferExecutorSync.RunSingleTask(TransferTableTask task)
at PX.BulkInsert.Provider.BatchTransferExecutorSync.fetchAndRunNextTask()
at PX.BulkInsert.Provider.BatchTransferExecutorSync.StartSync()
at PX.Data.Update.DtObserver.AskHowToRecoverFromError(Exception ex)
at PX.BulkInsert.Provider.BatchTransferExecutorSync.StartSync()
at PX.Data.Update.PXSnapshotCreator.WriteToArchive(PointDbmsBase point, ZipArchiveWrapper zip, FileFormat readFormats, FileFormat writeFormat)
at PX.Data.Update.PXSnapshotCreator.PrepareSnapshot(FileFormat ff)
at PX.Data.Update.PXSnapshotCreator.Start(FileFormat format0)
at PX.SM.CompanyMaint.<>c__DisplayClass66_0.b__0()
at PX.Data.PXLongOperation.<>c__DisplayClass18_0.b__0()