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