web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Database Dev Restore Error

(0) ShareShare
ReportReport
Posted on by 63

For the past couple of days, I have been trying to restore the database of my Dev environment. I followed the following steps: -

  • Refresh Database of the UAT Environment from LCS with Live environment as source environment.
  • Export Database of the UAT Environment.
  • Downloaded the bacpac file onto the Virtual Machine.
  • Downloaded and extracted the sqlpackage-win-x64-en-170.4.83.3 folder I got from the Microsoft page.
  • Opened cmd and set my directory to inside the SQL folder.

Now every time I have tried to run the database restore command, I get this error, here is the complete cmd transcript: -

C:\Users\Admin686d15ff45>cd /d J:\sqlpackage-win-x64-en-170.4.83.3

J:\sqlpackage-win-x64-en-170.4.83.3>SqlPackage.exe /a:Import /sf:J:\cpiuatbackup.bacpac /tsn:LOCALHOST /tdn:AXDB_FinNewCPIUat /p:CommandTimeout=6000 /TargetEncryptConnection:False
Importing to database 'AXDB_FinNewCPIUat' on server 'LOCALHOST'.
Creating deployment plan
Initializing deployment
Verifying deployment plan
Analyzing deployment plan
Importing package schema and data into database
Updating database
*** Error importing database:Could not import package.
Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 2714, Level 16, State 5, Line 1 There is already an object named 'DF__DMFDEFINI__PARTI__73790647' in the database.
Error SQL72045: Script execution error.  The executed script:
ALTER TABLE [dbo].[DMFDEFINITIONGROUPENTITY]
   ADD CONSTRAINT [DF__DMFDEFINI__PARTI__73790647] DEFAULT ((5637144576.)) FOR [PARTITION];


Error SQL72014: Core Microsoft SqlClient Data Provider: Msg 1750, Level 16, State 1, Line 1 Could not create constraint or index. See previous errors.
Error SQL72045: Script execution error.  The executed script:
ALTER TABLE [dbo].[DMFDEFINITIONGROUPENTITY]
   ADD CONSTRAINT [DF__DMFDEFINI__PARTI__73790647] DEFAULT ((5637144576.)) FOR [PARTITION];

 

Time elapsed 0:17:34.62

J:\sqlpackage-win-x64-en-170.4.83.3>

 

This is what happens each time I try to do it, I have tried redownloading the bacpac file, Refreshing the database of UAT again and getting a new bacpac file, and I tried manually altering the Dev table and dropping the mentioned object, but when I do that, I just get the same error again but with a different object.
Further information, my dev environment is version 10.0.45.

Please Help.

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 284 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 258 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 228 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans