Skip to main content

Notifications

Community site session details

Community site session details

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

Error import file .bacpac in Dev environment

(1) ShareShare
ReportReport
Posted on by 75
Dear Expert,
 
I import file .bacpac by MS SQL and have error :
Please, help me solutions. 
 
  • Verified answer
    GIB Profile Picture
    75 on at
    Error import file .bacpac in Dev environment
    Hi all thanks for advice.
    Now I've found a solution 
     
    1. Open the .bacpac file using winzip or 7-zip 
    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. For example: 

     

    sqlpackage.exe /Action:Import /tsn:[server].database.windows.net /tdn:[database] /sf:"C:\Temp\database.bacpac" /ModelFilePath:C:\Temp\model.xml 

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    Error import file .bacpac in Dev environment
    We faced this recently. The problem is with version of SSMS in dev vm. You need to update the SSMS in dev to 2022. Then you can convert the .bacpac to .bak. Because the Auto_Drop feature is introduced only in SQL Server 2022 only
  • Suggested answer
    Martin Dráb Profile Picture
    234,180 Most Valuable Professional on at
    Error import file .bacpac in Dev environment
    Here is one of possible solutions: Remove-AutoDropFromBacpacModel.ps1.

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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Martin Dráb Profile Picture

Martin Dráb 601 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 416

#3
Adis Profile Picture

Adis 384 Super User 2025 Season 1

Product updates

Dynamics 365 release plans