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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Error while importing the bacpac file to dev machine

(1) ShareShare
ReportReport
Posted on by 193
Hi ,
I exported the bacpac file from LCS and tried this command while importing - SqlPackage.exe /a:import /sf:C:\Users\Admin195bb577ec\Downloads\UAT.bacpac /tsn:localhost /tdn:AXDBUAT /p:CommandTimeout=1200 /TargetEncryptConnection:False 
 
 
 
Please suggest how to move further. Tried editing the model file but afterward how to procced, i am confused.
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,779 Super User 2026 Season 1 on at
    Hi,
     
    Try this :
     
    1. Open the .bacpac file using WinRar
    2. Copy the model.xml to a local folder “C:\Temp\model.xml 
    3. Edit the “C:\Temp\model.xml” with the desired password. For example: 

    find  <Property Name="AutoDrop" Value="True" />  and Delete

    4.  Run the import using sqlpackage.exe, but use the /ModelFilePath:C:\Temp\model.xml parameter to override the model.xml in the .bacpac file

     

    Best regards,

    Mohamed Amine MAHMOUDI

  • spidey1010 Profile Picture
    193 on at
    HI,
    I saw that reply on other thread. As i told u, i have edited the model file but cant proceed further like where should i use model file path in my command ?
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,779 Super User 2026 Season 1 on at
    Hi,
     
    you can use this :
     
    SqlPackage.exe /a:import /sf:C:\Users\Admin195bb577ec\Downloads\UAT.bacpac /tsn:localhost /tdn:AXDBUAT 
    /ModelFilePath:C:\Users\Admin195bb577ec\Downloads\model.xml 
     
     
    Best regards,
    Mohamed Amine Mahmoudi
  • spidey1010 Profile Picture
    193 on at
    HI Amine,
    Got the same error,
  • Suggested answer
    Martin Dráb Profile Picture
    238,745 Most Valuable Professional on at
    This is caused by a property added in a newer version of SQL Server than what you're using locally. You can remove it from the bacpac file with Repair-D365BacpacModelFile from d365fo.tools.
  • spidey1010 Profile Picture
    193 on at
    HI Martin,
    Tried executing this 
    Repair-D365BacpacModelFile -Path C:\Temp\Base.xml -KeepFiles -Force 
     
    But it says that it cannot recognise the Repair-D365BacpacModelFile as a command.
  • Martin Dráb Profile Picture
    238,745 Most Valuable Professional on at
    It means that you didn't install the Powershell module d365fo.tools correctly (or at all).
  • Verified answer
    spidey1010 Profile Picture
    193 on at
    This helped me resolving the issue - 
    1. Go to sql package folder.
    2. Open the power shell via admin.
    3. Run this command -  
    PS C:\Users\Admin195bb577ec\Downloads\sqlpackage-win-x64-en-162.4.92.3> .\SqlPackage.exe /a:import /sf:"I:\UAT.bacpac" /tsn:localhost /tu:axdbadmin /tp: ‘AX SQL password’ /tdn:AXDBUAT /p:CommandTimeout=1200 /p:DatabaseEdition=Premium /p:DatabaseServiceObjective=P1 /ttsc:true

    Replace AX SQL password with your sql password taken form LCS.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 401

#3
Diego Mancassola Profile Picture

Diego Mancassola 259

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans