microsoft / microsoft/DacFx

Import should show warning if the compat level is lower than the compat level in the bacpac

Open
#313 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
460
Forks
29
Avg merge
4d 9h
Merged PRs (30d)
7

Description

- SqlPackage or DacFx Version:
- .NET Framework (Windows-only) or .NET Core:
- Environment (local platform and source/target platforms):

**Steps to Reproduce:**

1. Create a db in Azure
2. Create STATISTICS with AUTO_DROP = ON
`CREATE TABLE tb1 (c1 int NOT NULL);
CREATE STATISTICS [stat] ON tb1(c1) WHERE c1 IS NULL WITH FULLSCAN, AUTO_DROP = ON;`
3. Export the database to a bacpac
4. Import the bacpac to 2019

Expected: import should show a warning if compat level in the bacpac is 160
Actual: export fails with error that AUTO_DROP is not a valid option

**Did this occur in prior versions? If not - which version(s) did it work in?**

(DacFx/SqlPackage/SSMS/Azure Data Studio)

Contributor guide

Open the contributing guide

Research direction

Reproduce the Azure database export and import steps with the stated AUTO_DROP statistics and a target compatible with SQL Server 2019. Compare the bacpac compatibility level with the target and verify that import reports a warning instead of failing during export because AUTO_DROP is unsupported.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sql
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.