sqlpackage.exe /a:script (and its equivalents) needs to have a consistent ordering to the output
- Dominant language
- C#
- Stars
- 460
- Forks
- 29
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 7
Description
Sorry in advance if this is the wrong place to log this issue. Kindly point me in the correct direction if there is a better place to log dacpac related issues and requests.
Consider I have production databases A and B, and a sqlproj with changes that will need to go to both.
If I generate an update script from the SQL proj's dacpac using VS, sqlpackage, or dac services api against both A and B, the results will be differently ordered. This makes it hard to determine if I can use the same generated script against both A and B. **EDIT**: *meaning I cant easily diff the scripts and have to resort to re-ordering the two in some way just to do a basic comparison.*
As an example, if the changes are for stored procs SP1, SP2, and SP3, one script will have them as SP2,SP1,SP3 and the other will have them as SP1,SP2,SP3. For a trivial example like this the differences are easy to identify, but for scripts that are going to be updating > 20 objects, making the determination of if I can apply the same script to both (and to databases C-Z) is not easily possible.
The same is true for the deploy report action, its never in a consistent order. Can these be made to produce consistently ordered outputs?
Contributor guide
Research direction
Start by reproducing the issue with sqlpackage.exe /a:script and the deploy report action against the same dacpac and the example databases. Compare the generated object ordering across outputs; done means equivalent scripts and reports have a consistent, deterministic order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100