Write a data quality rule as one row in a table. The kit checks it every day, fixes the simple errors itself with a full before-and-after log, and e-mails each data owner the exact records to fix or approve.
No agents, no services, no extra licences. Everything runs inside your database.INSERT dq.[Rule] (RuleCode, CheckType, TableName, ColumnName, FilterSql, OwnerEmail) VALUES ('CUST-VAT', 'UNIQUE', 'sales.Customer', 'VatNumber', 't.IsDeleted = 0', 'sales.admin@yourco.com'); EXEC dq.usp_RunChecks; SELECT * FROM dq.vOpenIssues;
| RuleCode | Status | Checked | Failed | Sample |
|---|---|---|---|---|
| CUST-VAT | FAIL | 7 | 2 | CustomerId 1, 7 |
| ORD-DATES | FAIL | 4 | 1 | OrderId 101 |
| ORD-TOTAL | FAIL | 4 | 1 | header 100.00 vs lines 79.00 |
| PROD-PRICE | PASS | 6 | 0 |
Duplicate customers, orphaned orders and blank fields quietly skew every dashboard built on top of them.
Someone notices a wrong invoice or a failed export weeks later. Nobody knows when it started or how many rows are affected.
IT sees the error but the business owns the data. The kit sends each owner their own list, with record keys, every day.
They create a dq schema with tables for rules, runs, results and bad-row samples, plus the procedures and report views.
One row per check: table, column, check type, owner, severity and an optional threshold. A demo with 13 example rules shows every check type.
A SQL Server Agent job runs the checks at 06:00, e-mails owners through Database Mail and trims old history.
Extra spaces, wrong letter case, dashes in VAT numbers, old codes that map to new ones. Describe the correction once and the kit applies it every morning before the checks run.
Every fix runs in preview mode first and shows the old and the new value for each record. Undo restores the old values with one command.
Mark a fix as needing approval and the kit only proposes it. Owners see the proposals in their daily e-mail.
A fix that would touch more rows than expected is blocked. Records edited by people after a fix are never overwritten by an undo.
Completeness, uniqueness, validity, consistency, integrity and timeliness, plus your own SQL for anything else.
Missing or blank values.
Duplicates on one column or a combination.
Values that do not match a LIKE mask, such as e-mails or product codes.
Numbers or dates below a minimum or above a maximum.
Codes outside an approved list.
Orphans with no parent row, even where no constraint exists.
Rows where a business condition is not true.
Tables that stopped being updated.
Any SELECT that returns the bad records.
sql/01_schema.sqlRules, runs, results and samples tablessql/02_procedures.sqlCheck engine and history purgesql/03_report_views.sqlScorecard, open issues, trend and samples for Excel or Power BIsql/04_autofix.sqlAutomatic fixes: preview, apply, approve, undo, change logsql/05_owner_digest.sqlDaily HTML e-mail per owner, with preview modesql/06_agent_job.sqlReady-made SQL Server Agent jobdemo/Demo tables with deliberate errors, 13 check rules and 7 fix rulesThe scripts find the problems. The playbook helps you get them fixed in a real company.
One payment. Use it in every database your organisation runs, on any number of servers.
Instant download. Payment is handled by our online reseller, who acts as merchant of record and adds VAT or sales tax where it applies. See terms and refunds.SQL Server 2017 or newer, any edition including Express. The kit was tested on SQL Server 2022. On Azure SQL Database the checks and views work, but e-mails and scheduling need Database Mail and SQL Agent, which that service does not have.
Each rule scans the filtered table once. Index the columns you filter on, keep heavy rules for the night, and limit samples. Counts are always complete.
That rule is saved with status ERROR and its message, and every other rule keeps running.
No. Everything runs inside your SQL Server. The only thing that leaves it is the e-mail you configure.
Yes. You get the full source and may modify it for your organisation. Reselling or publishing it is not allowed.
Yes, as long as each client holds its own licence.
SQL Server is a trademark of Microsoft Corporation. This product is not affiliated with or endorsed by Microsoft.