-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update "Import a bacpac file into a Tier1 environment" topic #828
Comments
Just restored a Tier2 |
@TrudAX That's good to see that the Grant.KillDatabaseConnection element was removed by Microsoft. Nevertheless, I think it is a good idea to add some guidance for Repair-D365BacpacModelFile to the How To Import Bacpac Into Tier 1. While the current issues for its use may have been resolved, @Splaxi envisioned the cmdlet as something that can also be used to address similar issues that may arise in the future. Also, even with the issues for new database backups resolved, there are presumably still .bacpac files out there that have the issues. With that in mind, I've reopened the issue. Let us know if you would be interested in updating the How To. |
Hello Long story short:
MS added another element with the reason: This is due to new changes to allow row version tracking for synapse for the Fintag table. This table uses an insteadofinsert trigger which may be incompatible between the versions you are transferring data to. I created a ticket as the obvious solutions didn't work and here is a list of fixes from them: Workaround 1.Please download the latest .net core version of SQLPackage.exe. Then, import the UAT DB and validate. Workaround 2.Could you please try the below steps in UAT.
Import the database now in CHE and validate. Workarodund 3.If it still fails, please try the below step. Just replace INSERT INTO FINTAG SELECT * FROM inserted, with below statement: INSERT INTO FINTAG (TAG01,TAG02,TAG03,TAG04,TAG05,TAG06,TAG07,TAG08,TAG09,TAG10,TAG11,TAG12,TAG13,TAG14,TAG15,TAG16,TAG17,TAG18,TAG19,TAG20, HASH, DISPLAYVALUE, HASHVERSION, PARTITION, RECID, RECVERSION, MODIFIEDDATETIME, MODIFIEDBY, CREATEDDATETIME, CREATEDBY) SELECT TAG01,TAG02,TAG03,TAG04,TAG05,TAG06,TAG07,TAG08,TAG09,TAG10,TAG11,TAG12,TAG13,TAG14,TAG15,TAG16,TAG17,TAG18,TAG19,TAG20, HASH, DISPLAYVALUE, HASHVERSION, PARTITION, RECID, RECVERSION, MODIFIEDDATETIME, MODIFIEDBY, CREATEDDATETIME, CREATEDBY FROM inserted and save the file. -While using the sqlpackage.exe import action, add /mfp:"YourCopiedModel.xmlPath" to the commands, this will allow you use the edited model.xml instead of original one in the .bacpac. Workaround 4.This workaround was provided by one of our customer. I can comment that Workaround 1 and 2 didn't work. But I wanted to let you know the possible solutions. The main goal from my side here is to let you know, that Workaround 3 did actually work. The second and most important thing what I wanted to achieve with this comment: Would it be possible to include this "fix" into "Repair-D365BacpacModelFile"? Maybe as an additional parameter? Something like -FixFinTagTrigger This would reduce the manual work required. Thank you for your time. |
Thanks for the detailed report. You can also try the PathRepairReplace parameter of I'm a bit hesitant to include a dedicated functionality for this issue in the cmdlet. Microsoft continues to come up with issues around the .bacpac import. So trying to address each issue individually is a bit like a game of whac-a-mole. Unfortunately, we do not have the manpower to play that game :( It would also be helpful to have access to a model.xml file with this issue. I have yet to encounter this issue, which makes it hard to analyze further. @Splaxi for awareness, since you implemented the cmdlet. |
That's the thing - environments were on 10.0.40 and I took a fresh DB copy. The Financial Tags feature wasn't enabled on any environments, which is even more confusing on why it suddenly had problems related to it. Even if I enable that feature, then next step with running the "Deploy financial tag table triggers" job is not possible as it doesn't exist. No worries. I totally understand that this isn't something worth the potential effort. The workaround is actually quite easy and fast to perform and taking in mind that Sandbox DB restore on Tier1 isn't a daily task usually, then it's totally doable by hand. At least I know what to do and I'll document this for my colleagues. Might as well be a client specific issue.. who knows. Hope that at least the MS suggested steps will be of help to others who stumble upon this thread. |
Hi.
I think this wiki topic should be updated(at least for the current date usage)
https://github.com/d365collaborative/d365fo.tools/wiki/How-To-Import-Bacpac-Into-Tier1
Repair-D365BacpacModelFile should be added to the process. Right now, restore can't be done due to the Kill permission problem
The text was updated successfully, but these errors were encountered: