Benchdog SQL Data Scrambler
A VS Code extension for scrambling the personal data in a test or dev copy of a SQL Server or Azure SQL database. Tick the tables; Data Scrambler works out how each column changes from its name: fake names, emails, phones and addresses, masked card, account and ID numbers, moved dates of birth and pay. Keys stay as they are, so rows still join. All the work is done by the Benchdog engine (benchdog serve); this extension is the screen.
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
- Scrambles view: a SQL Data Scrambler panel in the activity bar lists your saved scrambles, one per database. Click one to open it.
- New Scramble: the + button. Pick the copy to scramble (Azure SQL from your Benchdog account, or a SQL Server by name). It is tested first. Never pick the live database.
- Scramble tab: every table in the database with its rows now. Tick a table to scramble it; the tick at the top ticks or clears every table shown, and Filter by name narrows the list. Changes says how many of a ticked table's columns change. An amber tag marks a table that looks personal and is not ticked, or one with notes; a red one a table that is left out, with why as the tooltip. Tick it, next to the line that says how many tables look personal, ticks them all. The refresh button reads the database again.
- Settings: the seed every scrambled value is worked out from (leave it empty for a new one each run, so nobody can check a guess against the copy), the language fake values are made in, the rows read at a time, and a switch to let triggers fire.
- Columns: click a ticked table to see how each column changes and why. Choose a column's rule from those that fit it: Keep, Fake (with the generator to use), Shuffle, Mask (with how many characters stay at the end), Set to NULL, One value, Noise (with how far a number moves) or Date shift (with how many days at most). Keys, identities, computed columns and columns other tables point to are kept.
- Preview Rows: shows the first 50 rows before and after, with the values that change marked. Nothing is written.
- Scramble: says what it changes and asks first, then asks you to type the database's name. It scrambles in place, one table at a time; each table is scrambled whole or left as it was. On SQL Server, Back Up and Scramble takes a copy-only backup first. The tab reads the database again afterwards.
- Project files: a
.datascrambler.json file keeps a scramble (database, tables, chosen rules, seed and language) to run again from VS Code, the benchdog data scramble --project CLI or the desktop app. Right-click a scramble and choose Save as Project File... to write one. Open one to get IntelliSense, its problems in the Problems panel, and an Open Scramble link at the top; Open Scramble, also on the editor title and the Explorer's right-click menu, adds it to the Scrambles view and opens 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 scramble and choose Forget Password to clear it.
Settings
| Setting |
Does |
benchdogDataScrambler.enginePath |
Full path to the benchdog executable. Empty uses the one that ships with the extension. |
benchdogDataScrambler.tenant |
Tenant id to search for Azure SQL databases. Empty means your home tenant. |
benchdogDataScrambler.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 scramble's server, database name, how to sign in, tables and chosen rules; never a password, and never a value from the database.
- Planning and previewing only read. The database changes only after Scramble, a confirmation that says what it changes, and the database's name typed in.
- Names and values 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 benchdogDataScrambler.diagnostics setting to have the engine write a debug log of what it does, for finding out why something went wrong. Run Benchdog SQL Data Scrambler: 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/datascrambler. Something else? The support form, or support@benchdog.dev, and a person replies.
| |