HN: SQL Guard – Stops Delete/Drop/Truncate Without Where in SSMS

manuelenzo1 pts0 comments

SQL Guard — Free SSMS Extension to Prevent Destructive Queries<br>SQL Guard — Stop Destructive SQL Before It Runs

Free SSMS Extension

DELETE FROM orders<br>Blocked<br>47,293 rows saved

One wrong query.<br>Goodbye, production.

SQL Guard intercepts destructive SQL commands inside SSMS the moment you press F5 — before any damage is done. DELETE without WHERE, TRUNCATE, DROP — stopped in real time.

⬇ Download Free<br>See how it works →

SSMS 18 – 22<br>Windows<br>Zero config<br>No data collected

SQLQuery1.sql — Microsoft SQL Server Management Studio

-- production (PROD-SQL-01\MSSQLSERVER)

⚠ SQL Guard — Dangerous Query Detected

This will affect .

✓ Cancel Query<br>Run Anyway

Destructive patterns intercepted

2 min<br>Install to protected

100%<br>Free plan — no limits

Queries sent anywhere

Without SQL Guard

Every developer has been here.

One moment of inattention. One missing WHERE clause. Recovering a production database takes an average of 4+ hours — and only if you have recent backups.

DELETE FROM orders

No filter. No warning. No undo.

Every order record in your production database, wiped in milliseconds. The transaction log is your only hope — if you have one.

47,293 rows gone

UPDATE users SET role = 'admin'

Every user is now an administrator.

Meant to promote one account. Forgot the WHERE. 1.2 million users with admin rights until someone notices.

Privilege escalation

TRUNCATE TABLE audit_log

Compliance logs. Gone.

GDPR audit trail, security events, forensic data — all cleared. Irreversible. TRUNCATE doesn't log individual rows.

Irreversible

How It Works

Installed in 2 minutes. Works silently forever.

SQL Guard hooks directly into SSMS. No separate app, no background process, no network calls.

Install the extension

Run the installer. SQL Guard registers itself with all your SSMS versions (18–22) automatically.

Write SQL normally

Nothing changes in your workflow. Write, test, and run queries exactly as you always have.

Press F5

If a dangerous pattern is detected, execution pauses and you see exactly what would have happened before confirming.

Ready to protect your queries?

Installed in 2 minutes. Works on SSMS 18–22. Zero configuration.

⬇ Free Download

What It Catches

9 rules. All the classics.

Every pattern that has caused a real production incident, monitored by default.

🗑 DELETE without WHERE High

✏️ UPDATE without WHERE High

⚡ TRUNCATE TABLE Medium

💣 DROP TABLE High

☠️ DROP DATABASE High

🗄 DROP PROCEDURE High

⚙️ ALTER DATABASE Medium

⚠️ Dangerous EXEC Medium

🔀 MERGE without filter Medium

Product Tour

See it in action.

From the Tools menu to the moment it stops a destructive query — five screens, in order.

One entry in the Tools menu

SQL Guard adds a single "SqlGuard – Settings…" item to SSMS's Tools menu. No separate app to launch, no icon to hunt for.

Every rule, explained and toggleable

Each rule shows what it catches, why it matters, and its severity. Turn off only the ones you're certain about — one switch each.

Whitelist the tables that are meant to be truncated

A staging table that gets wiped on every import shouldn't trigger a warning every time. Whitelist it per rule, per table — never a blanket bypass. Update checks live in the same window.

Caught the moment you press F5

An UPDATE without a WHERE clause pauses right there in SSMS, with the exact rule that fired and the object it affects — before a single row changes.

Same treatment for every risky pattern

TRUNCATE, DROP, a dangerous EXEC — every rule shows the same clear warning, with Cancel, Run Anyway, or Run and ignore for this session.

About

Built by a developer, for developers.

Manuel Enzo

Backend Developer · Italy

Backend Developer with over 3 years of experience building enterprise software in .NET and SQL Server. I built SQL Guard after watching a colleague accidentally truncate a production table — the kind of incident that doesn't need to happen. It's the tool I wish existed when I started working with SSMS daily.

💼 LinkedIn<br>🐙 GitHub Profile<br>✉ Email

FAQ

Common questions.

Does SQL Guard read or transmit my queries? ▾<br>No. SQL Guard inspects queries locally inside the SSMS process. No query text, no connection strings, no database names ever leave your machine. The optional anonymous error reporting (Sentry) only sends crash stack traces — never query content.

Can I run the query anyway after the warning? ▾<br>Yes. SQL Guard shows a warning and waits for your decision. You can cancel the query or choose "Run Anyway" — you're always in control. The goal is to make the action conscious, not to block it entirely.

Which SSMS versions are supported? ▾<br>SQL Guard supports SSMS 18, 19, 20, 21, and 22. The installer automatically detects and registers with all installed versions. No manual configuration needed.

Does it slow down query execution? ▾<br>No measurable impact. The rule engine is a simple pattern-matching pass over the query text — it runs in under a millisecond. You'll never notice it on...

guard ssms query truncate without drop

Related Articles