Benchdog SQL Schema Compare
A VS Code extension for comparing the structure of two SQL Server or Azure SQL databases. It shows which objects are the same, which differ and which are on one side only, what differs in each, and their scripts side by side, then writes a deploy script or deploys to the target. All the work is done by the Benchdog engine (benchdog serve); this extension is the screen.

Target only objects start clear, so nothing is dropped unless you choose it.

Show Deploy Script opens it in a new, unsaved editor.
Install
Install it from the Marketplace in VS Code. The Benchdog engine ships inside the package for Windows (x64), so there is nothing else to install and no .NET needed. Mac and Linux are coming. The desktop app and the benchdog command for the same tool are at benchdog.dev.
What it does
- Comparisons view: a SQL Schema Compare panel in the activity bar lists your saved comparisons, each a source whose structure you want and a target to compare with it. Click one to compare.
- New Comparison: the + button. Pick the source (Azure SQL from your Benchdog account, or a SQL Server by name), then the target, which can be another database on the same server. Each one is tested first.
- Comparison tab: only what differs is listed, grouped by kind (Schemas, Users, Roles, Types, Sequences, Tables, Views, Functions, Procedures, Synonyms, Triggers), each with its count. Each object has a coloured tag, as in the desktop app: amber for different, green for only in the source, red for only in the target. It also shows when the object last changed on each side. Filter by name narrows the list. Compare Again reads both databases again.
- Details: click an object to see what differs, such as a column's type or an index's columns, and its CREATE script on each side, with the lines that differ marked.
- Options: Options... ticks what does not count as a difference, such as comments, case or permissions. The comparison keeps the ones you change.
- Choosing what to deploy: what differs and what is in the source only start ticked; what is in the target only starts clear, since deploying it drops it. Each kind's tick ticks or clears all of it. Your ticks stay when the tab compares again.
- Show Deploy Script: opens the script for what is ticked in a new, unsaved SQL editor, to read, copy or save. It only reads.
- Save Deploy Script: writes a T-SQL script for what is ticked, to review and run in SSMS, sqlcmd or Azure Data Studio. It runs in one transaction, so a failure changes nothing. Warnings sit at its top.
- Deploy: works out the deploy from both databases as they are now, shows what it changes and its warnings, and deploys after you confirm, in one transaction. On SQL Server, Back Up and Deploy takes a copy-only backup first. The tab compares again afterwards.
- Project files: a
.schemacompare.json file keeps a comparison (source, target, options and name patterns) to run again from VS Code, the benchdog schema compare --project CLI or the desktop app. Right-click a comparison and choose Save as Project File... to write one. Open one to get IntelliSense, its problems in the Problems panel, and a Compare link at the top; Compare, also on the editor title and the Explorer's right-click menu, adds it to the Comparisons view and compares it. A project file never holds a password.
- Sign in and SQL logins work as in the other Benchdog SQL tools: your Benchdog account for Azure SQL, your Windows account for SQL Server on your network, or a SQL login whose password Benchdog keeps until VS Code closes or, if you choose, in the system's secure store. The eye on the password box shows what you typed. Right-click a comparison and choose Forget Passwords to clear them.
Settings
| Setting |
Does |
benchdogSchemaCompare.enginePath |
Full path to the benchdog executable. Empty uses the one that ships with the extension. |
benchdogSchemaCompare.tenant |
Tenant id to search for Azure SQL databases. Empty means your home tenant. |
benchdogSchemaCompare.useAzureCli |
Sign in to Azure SQL through your existing az login instead of the browser. |
The settings are separate from the other Benchdog extensions', so they can all be installed together.
How it stays safe
- Every database is reached as you. The extension keeps only each comparison's servers, database names, how to sign in, options and name patterns; never a password.
- Comparing, showing and writing a script only read. The target changes only after Deploy and a confirmation that says what changes and what to read first, and then in one transaction.
- Names and scripts are set as text on the page, so nothing from a database can become markup. The tab is thrown away when hidden.
Diagnostics
Turn on the benchdogSchemaCompare.diagnostics setting to have the engine write a debug log of what it does, for finding out why something went wrong. Run Benchdog SQL Schema Compare: Open Diagnostics Logs Folder to see the logs. Passwords, connection strings, tokens and your data are never written.
Trial and licence
Every Benchdog tool has a thirty day trial with every feature and no card: ask for one at benchdog.dev/trial. One licence is for one person and covers the VS Code extension, the desktop app and the command line, on every machine you work from. Prices are at benchdog.dev/pricing. The licence is checked offline; the tool contacts benchdog.dev only when you ask it to, never in the background. The terms are in LICENSE.md and at benchdog.dev/terms.
Help and support
Getting started, how to do the common jobs, the questions people ask and what to try when something goes wrong: benchdog.dev/help/schemacompare. Something else? The support form, or support@benchdog.dev, and a person replies.
| |