microsoft / microsoft/azure-sql-database-container

[Bug]: An error occurs when importing bacpac

Open
#140 0 comments 0 reactions 2 assignees View on GitHub

@ericjulien is already working on this.

Since Aug 18, 2026.

bug User-filled
Dominant language
Shell
Stars
17
Forks
4
Avg merge
9h 49m
Merged PRs (30d)
15

Description

Container image tag

sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest

Host OS

Windows 11 (x86_64)

Container runtime and version

Docker version 29.1.3, build f52814d

What happened

When I import a bacpac exported from SQL Database, the following error occurs.

パッケージをインポートできませんでした。
Error SQL72014: Framework Microsoft SqlClient Data Provider: メッセージ 12134、レベル 16、状態 2、行 5 Optimized Locking is enabled for this database. To disable Accelerated Database Recovery, disable Optimized Locking and try again.
Error SQL72045: スクリプトの実行エラーです。 実行されたスクリプト:
IF EXISTS (SELECT 1
           FROM   [master].[dbo].[sysdatabases]
           WHERE  [name] = N'$(DatabaseName)')
    BEGIN
        ALTER DATABASE [$(DatabaseName)]
            SET ACCELERATED_DATABASE_RECOVERY = OFF 
            WITH ROLLBACK IMMEDIATE;
    END


Error SQL72014: Framework Microsoft SqlClient Data Provider: メッセージ 5069、レベル 16、状態 1、行 5 ALTER DATABASE statement failed.
Error SQL72045: スクリプトの実行エラーです。 実行されたスクリプト:
IF EXISTS (SELECT 1
           FROM   [master].[dbo].[sysdatabases]
           WHERE  [name] = N'$(DatabaseName)')
    BEGIN
        ALTER DATABASE [$(DatabaseName)]
            SET ACCELERATED_DATABASE_RECOVERY = OFF 
            WITH ROLLBACK IMMEDIATE;
    END


 (Microsoft.SqlServer.Dac)
Steps to reproduce
  • SQLDB SKU: Basic
  • ADR / Optimize Lock: ON
  • bacpac: Created in SSMS 22.9.0

When I performed the following operation using this environment, an error occurred during the import.

  1. Exporting a SQL Database bacpac to a local disk in SSMS
  2. Importing an exported BACPAC from SSMS into SQL Developer

I'm simply importing a bacpac that I exported, but I'm getting an error during the import.

Additional context

No response

Confirmation
  • I scanned open issues and Known limitations for a duplicate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.