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

Notifications

Announcements

No record found.

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. 
 
I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    Here is one of possible solutions: Remove-AutoDropFromBacpacModel.ps1.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    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
  • Verified answer
    GIB Profile Picture
    75 on at
    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 

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans