Update QueryStoreCaptureMode value in JSON#900
Update QueryStoreCaptureMode value in JSON#900FH-Inway merged 1 commit intod365collaborative:masterfrom
Conversation
This old issue appeared for me when importing bacpac exported from UDE environment. The option 4 for querystore query_capture_mode is not supported. Details in this discussion: https://community.dynamics.com/forums/thread/details/?threadid=0e2e7d36-3b6c-4b65-99e4-c29a71e3ec76
|
Looks good to me. Curious though that this issue still occurs. |
For importing I used the one, which is being downloaded when executing Bacpac source was not from LCS. It was from connection to UDE DB via Microsoft SQL Server Management Studio 21 then on DB_toExport->Tasks->Export data-tier application |
Ah, very interesting, sorry I did not see that UDE is the source in your original post. I've been meaning to experiment with these bacpac exports, but have not gone farther than exporting. Makes sense that Microsoft configures these databases with no regards to bacpac exports or imports. I would be very interested if you can share more about that process. From what I've read from others, there are other changes to the database involved. I'm thinking of putting all those steps into new d365fo.tools functions so this becomes a more streamlined and automatable process. In any case, thanks a bunch for your contribution! |
I don't do many more DB changes after importing as it's more for dev purposes. As for the whole process. Basically it now looks like so: Get-D365BacpacTable -Path "E:\bacpac\SOURCE_DB.bacpac" -SortSizeDesc -Top 20
Clear-D365BacpacTableData -Path "E:\bacpac\SOURCE_DB.bacpac" -Table "BATCHHISTORY","SECURITYOBJECTHISTORY" -OutputPath "E:\bacpac\SOURCE_DB_cleaned.bacpac"
Export-D365BacpacModelFile -path "E:\bacpac\SOURCE_DB_cleaned.bacpac" -OutputPath "E:\Temp\SOURCE_DB_cleaned_MODEL.XML"
Repair-D365BacpacModelFile -Path "E:\Temp\SOURCE_DB_cleaned_MODEL.XML" -PathRepairSimple "C:\Temp\RepairBacpac.Simple.json" -PathRepairQualifier "C:\Temp\RepairBacpac.Qualifier.json" -PathRepairReplace "C:\Temp\RepairBacpac.Replace.json" -OutputPath "E:\Temp\SOURCE_DB_cleaned_MODEL_REPAIRED.XML"
Import-D365Bacpac -BacpacFile "E:\bacpac\SOURCE_DB_cleaned.bacpac" -ImportModeTier1 -NewDatabaseName PFUT_EMEA_20251017 -ModelFile "E:\Temp\SOURCE_DB_cleaned_MODEL_REPAIRED.XML" -ShowOriginalProgressAlso FYIo we could technically put model.xml back into bacpac. It would have an error, but it can be solved by one additional step: |
This old issue appeared for me when importing bacpac exported from UDE environment. The option 4 for querystore query_capture_mode is not supported. Details in this discussion: https://community.dynamics.com/forums/thread/details/?threadid=0e2e7d36-3b6c-4b65-99e4-c29a71e3ec76