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 :
Microsoft Dynamics AX (Archived)

Import SAT bacpac into DEV VM not working

(0) ShareShare
ReportReport
Posted on by 766

I tried to copy a SAT DB into Build environment. Export was working fine. I followed the steps described here: https://docs.microsoft.com/en-gb/dynamics365/operations/dev-itpro/database/copy-database-from-azure-sql-to-sql-server

When trying to import this bacpac into our DEV/Test or into one of our developer VMs I always get the following error:

Has anyone an idea why the import is trying to set containment to partial after it has created a DB with activated change tracking?

Any idea how to manipulate the bacpac to get around this problem?

 

C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin>SqlPackage.exe /a:import /sf:D:\SATDB\SAT_20170426.bacpac /tsn:localhost /tdn:AxDB_fromProd /p:CommandTimeout=1200

Importing to database 'AxDB_fromProd' 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: .Net SqlClient Data Provider: Msg 12838, Level 16, State 1, Line

5 Replication, Change Data Capture and Change Tracking are not supported in con

tained databases. The database 'AxDB_fromProd' cannot be altered to a contained

database, since it has one of these options turned on.

Error SQL72045: Script execution error.  The executed script:

IF EXISTS (SELECT 1

           FROM   [master].[dbo].[sysdatabases]

           WHERE  [name] = N'$(DatabaseName)')

    BEGIN

        ALTER DATABASE [$(DatabaseName)]

            SET FILESTREAM(NON_TRANSACTED_ACCESS = OFF),

                CONTAINMENT = PARTIAL

            WITH ROLLBACK IMMEDIATE;

    END

 

 

Error SQL72014: .Net SqlClient Data Provider: Msg 5069, Level 16, State 1, Line

5 ALTER DATABASE statement failed.

Error SQL72045: Script execution error.  The executed script:

IF EXISTS (SELECT 1

           FROM   [master].[dbo].[sysdatabases]

           WHERE  [name] = N'$(DatabaseName)')

    BEGIN

        ALTER DATABASE [$(DatabaseName)]

            SET FILESTREAM(NON_TRANSACTED_ACCESS = OFF),

                CONTAINMENT = PARTIAL

            WITH ROLLBACK IMMEDIATE;

    END

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    239,118 Most Valuable Professional on at

    Are you sure that the scripts disabling change tracking (described under Prepare the copied database) completed successfully?

  • ThomasWilke Profile Picture
    766 on at

    Hi Martin,

    yes the change tracking is disabled in the source db. I checked that after executing the scripts. So it must be something else. I found a blog post where someone already mentioned the same issue in the conmments: blog.zealots.solar

  • Verified answer
    ThomasWilke Profile Picture
    766 on at

    Hi Martin,

    after several tests I found out I made a mistake during the export. I prepared the export DB but i exported another DB :( So exporting the correctly prepared DB solved the problem.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Basit Profile Picture

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans