r/SQLServer • u/dzsquared • Jun 17 '26
Community Share Preview for schema compare and SQL formatting landed in SSMS 22.7
Hi folks - we added previews for both schema compare and SQL formatting in SSMS last week. You don't have to enable any additional workloads in the SSMS installer, just update your install and the functionality will be available in the menus.
Schema compare can be launched from the Tools menu or in object explorer on a specific database. If you have the "Database DevOps" workload installed with SSMS, you can also launch schema compare from a SQL project directly.
Schema compare is really handy for being able to tell what has changed and optionally capture/apply the differences to another "thing" (live database or source-controllable SQL project)
SQL formatter has quite a few settings available in the SSMS options as well as the ability to do per-project configuration with .editorconfig files. I've been really stoked to see so many folks trying it out and sharing quite a few requests for additional formatting options since the release last week. If you take it for a spin, check out what others have been requesting and let us know if you're interested in additional options.
Since I work on schema compare and SQL formatter, I'm obviously super biased, but I'll mention that GitHub Copilot in SSMS also gained Agent mode in the 22.7 release. There's a number of people putting in hard work on SSMS and the full details can be found in the release notes.
(putting all the links in the comments because automod is flagging MS Learn docs as url shorteners)
5
u/dzsquared Jun 17 '26
Formatter docs - https://learn.microsoft.com/en-us/ssms/scripting/format-t-sql
Release notes - https://learn.microsoft.com/en-us/ssms/release-notes-22
Blog post of schema compare and formatter in SSMS - https://community.fabric.microsoft.com/t5/Fabric-Updates-Blog/Power-up-in-SSMS-22-7-Schema-compare-and-SQL-formatting/ba-p/5193417
Check out the latest submitted SSMS feedback items - https://developercommunity.visualstudio.com/SSMS?sort=newest
3
u/SonOfZork Jun 17 '26
Schema compare hangs on databases with a large number of objects. It would be nice to allow pre filtering in certain schema or object types.
When scripting out differences in users that have defined logins it forgets to include anything after the "with".
Overall it's not bad for a first effort preview even though light years behind SQL prompt. Same first for formatting. Decent first effort but a long way to go options wise.
1
u/SirGreybush 1 Jun 17 '26
I just wish some form of integrated copilot existed without having to install the Gateway and pay for the extra fees MS wants.
That SSMS uses our credentials like it already does for IntelliSense & auto-completion like it already does, but that I could ask for custom scripts when I right-click on a table and do Script Table As... and choose Insert or Update, instead of the boiler plate that's there.
Or is that the .editorconfig files and this feature already exists?
Due to high security, I cannot install and use 3rd party software, only base SSMS. So base SSMS should be more intelligent.
This is an excellent new tool, the schema compare. What about TSQL compare?
We are currently on 20.2.1
1
u/Zikato Jun 17 '26
Is there a CLI version?
1
u/fatherjack9999 Jun 17 '26
Code formatting is the reason I upgraded. Code formatting works perhaps 1 time in 10 attempts. Quite disappointed.
1
u/jagaddjag Jun 17 '26
Hi can you give more insight about git copilot agent feature added along with ssms 22.7?
1
u/AlternativeWanders Jun 19 '26
Will formatting settings be exportable across teams?
1
u/Fergus653 Jun 24 '26
Cool to have formatting. One thing I couldn't find config for, it appends comments to the preceding line. If I temporarily comment out a line I would like it to remain a separate line instead of being added to the previous line.
1
u/dbrownems ‪ ‪Microsoft Employee ‪ Jun 17 '26
Why choose a different keyboard shortcut for code formatting than Visual Studio and VS Code?
1
u/Yacko_75 Jun 17 '26
Schema compare is nice but the slowness of deselecting/selecting everything and not being able to select multiple records and having to individual select/deselect them could use some work. Why does selection/deselecting take so long? For large databases this also takes a LONG time or seems to hang at times.
1
u/PFlowerRun Jul 14 '26
To join the party, I’m the only one who finds the default join formatting quite unreadable? I’m unable to find any setting in the Options, but I’d like to see join clauses on a single line only.
I hate its default:
left outer join
TBL2 S
on M.COL1 = S.COL1
and S.COL2 = 0
1
u/blackneckbean Aug 19 '26
Nice to see formatting finally getting more attention in SSMS. I’ve been using dbForge SQL Complete as my SQL code formatter for a while, so I’d be especially interested in how close the native formatter gets once more customization options land.