SQL Sage · Documentation

SQL Sage documentation

Install the AI assistant for SQL Server Management Studio in two minutes, sign in inside Claude Code or the Codex CLI with the Claude or ChatGPT account you already have, and start diagnosing and writing T-SQL right where you work.

On this page

  1. Requirements
  2. Install (2 minutes)
  3. Sign in
  4. Everyday use
  5. Free tools (no AI)
  6. SQL Sage History
  7. What's blocking now
  8. SQL Sage Search
  9. Find usages of column
  10. Related tables after JOIN
  11. Check this database
  12. F5 Guard
  13. Format, expand, qualify, execute
  14. Keyboard shortcuts
  15. Free and Pro
  16. Getting started, trial & licence
  17. The chat: Agent & Ask
  18. Connect repository (preview)
  19. Explain error
  20. Change-Impact, Incident Mode, Prove-It
  21. Is this slower than before?
  22. Audit log & Export evidence
  23. Mask names
  24. Inline completions (Alt+.)
  25. Diagnostics & health
  26. Safety & privacy
  27. Skills
  28. Troubleshooting
  29. Update & uninstall
  30. For IT and administrators
  31. Licensing FAQ
  32. Privacy FAQ

01Requirements

The Free tools (sections 05–14) need neither: they make no AI calls, so they work without Claude Code, the Codex CLI or an API key. What needs what is listed in Free and Pro.

SQL Sage's AI features work through Claude Code or the Codex CLI, where you sign in with your own Claude or ChatGPT account. AI usage is not included: Claude Code needs a Claude plan that includes it or an Anthropic Console account, and Codex a ChatGPT account; or use your own Anthropic API key. No GitHub account, no Copilot licence, no extra AI bill from us.

02Install (2 minutes)

  1. Download SqlSageSetup.exe.
  2. Close SSMS.
  3. Run the installer and approve the UAC prompt.
  4. Open SSMS again — the SQL Sage panel opens automatically (or use View → Other Windows → SQL Sage).
“Windows protected your PC”? The installer is Authenticode-signed and timestamped by LUMA SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ. Windows SmartScreen can still warn because a newly published file has not built up download reputation yet — it is not a malware detection. Click More info, check that Publisher shows that name, then click Run anyway. See Troubleshooting.

03Sign in

In the panel's status bar, pick a provider and sign in:

On the two CLI channels SQL Sage never sees, stores, or transmits your credentials — it only asks the CLI whether you're signed in. An own key is the exception: it is stored on your machine, DPAPI-encrypted, as above. Choose the model and reasoning effort with the button at the bottom of the chat (for example Opus · Auto); your history is kept when you switch provider or model.

04Everyday use

Chat in the context of your connection

The chat is locked to one server and database, shown at the top at all times, so answers know which engine, version and database they're about. Pin the chat to a specific query window (📌) when you work across several servers.

Right-click actions

Select T-SQL in a query window, right-click → Ask SQL Sage ▸ Explain / Fix / Optimize / Document (or press Ctrl+Alt+Shift+E/F/O/D). The chat opens with your SQL already in context — no copy-paste. The same actions are also under the Tools menu.

Explain a failed query

When a query fails, a bar at the top of that window offers Explain error (or right-click → Ask SQL Sage ▸ Explain last error). SQL Sage first shows what your database's catalog proves — on SQL Sage Free too — then, with a licence, the AI explains the cause and returns a fixed query. Details, and what is sent: Explain error.

Slash commands

Type a command at the start of the message box and press Send; the / button next to the box lists the common ones. Text after a command is added to its instruction, for example /optimize keep the same row order. A word after / that SQL Sage does not know is sent as you typed it.

CommandWhat it doesAI
/explainExplains what the SQL does, step by step, and calls out anything surprising, expensive or riskyYes
/optimizeSuggests indexes and rewrites, with the reasoning and the improved queryYes
/fixFinds and fixes the problem in the SQL and returns the corrected queryYes
/docAdds explanatory comments to the SQLYes
/impactBefore the SQL runs: what it changes, what depends on those objects, the rows affected and the risk, from the change-impact tool. The SQL is not run. See Change-Impact.Yes
/querystore or /qsReports the top regressed and most expensive queries of the current database from Query Store, read-onlyYes
/formatFormats the attached or selected SQL on this computer with the T-SQL parser and shows it in the chat; no tokensNo
/effort <level>Sets the reasoning effort for the next answer only, for example /effort high; nothing is sent (see The chat)No
/helpLists these commands in the chatNo

The AI commands act on the query attached to the chat: the active query window's text or your selection. They are chat answers, so they need a licence or the trial. /help, /format and /effort are answered on this computer; /help and /format also work on SQL Sage Free.

SQL block toolbar

Every SQL block the assistant writes carries a READ / WRITE / DDL badge and one-click Copy · Insert · New query · Run · Format. Insert is never Run — putting text in your editor and executing it are two different buttons.

Read from your results (opt-in)

Off by default. Turn on Include results under the privacy shield next to Send, then right-click → Explain copied results (send exactly what you copied from the grid) or Attach query results (re-run). The first send per session asks for explicit consent showing the row/column count and that data will leave your machine. How that consent works: Include results.

05Free tools (no AI)

The tools in sections 06–13 are part of SQL Sage Free: they keep working after the trial and without a licence. They make no AI calls, so they also work when Claude Code or the Codex CLI is not installed or not signed in, and they send nothing to the AI. What they read from the server — catalog metadata and server state — they read with your query window's own sign-in. Apart from Execute current statement, which is your own F5, none of them runs your SQL.

ToolOpen it with
SQL Sage HistoryCtrl+Shift+X in a query window, or View › Other Windows › SQL Sage History
What's blocking nowTools › SQL Sage Tools › What's blocking now, or the Now tab of SQL Sage History
SQL Sage SearchCtrl+Alt+D, or Tools › SQL Sage Tools › Find object…
Find usages of columnShift+F12 on a column in SQL Sage Search
Related tables after JOINType JOIN and a space, then pause
Check this databaseTools › SQL Sage Tools › Check this database
F5 GuardOn by default: press F5 on a risky script
Format, expand, qualify, executeRight-click in a query window › SQL Sage Tools

Everything under SQL Sage Tools is in two places: the right-click menu of a query window and the Tools menu. The paid AI actions sit next to it under Ask SQL Sage.

06SQL Sage History

SQL Sage History keeps the queries you run in SSMS query windows, so you can find one again and reopen it. It also keeps the query tabs you close without saving. Everything stays on this computer, encrypted for your Windows account.

What it records

Every run you start with F5 or Execute in a query window: the SQL text as it ran, the server, database and login, the time, the status, the duration, the rows returned and the class (READ, WRITE, DDL, or UNKNOWN when the SQL cannot be classified). Query results are never saved.

Find and reopen a query

  1. Open the window. From a query window it opens filtered to that window's server and database, shown as a chip you can remove (✕) to see every server. The cursor is in the search box, and Esc takes you back to your query window.
  2. Type in the search box. Every word must match, in the SQL text, the server name or the database name. Narrow it further with the filters: status (Succeeded, Failed, Cancelled / timed out), class (READ, WRITE (and unknown), DDL) and period (Today, Last 7 days, Last 30 days). ↓ or Enter moves from the search box to the list.
  3. Select an entry to see its whole SQL. Then use Open in new window (Enter), Insert at cursor (Ctrl+Enter), Copy SQL (Ctrl+C) or Delete (Del, with Undo). The right-click menu also has Copy server name and Stop recording this server.

Open in new window never runs anything. It puts the SQL into a new query window. That window is connected only when your active query window is connected to the same server: SQL Sage copies that connection and switches to the entry's database. Otherwise the new window opens not connected. A bar at the top of the new window says where the query ran and whether this window is connected, so you can check the server and database before you press F5. Running a query again is always your own F5.

Recently closed (unsaved)

Closed a query tab without saving it? Open the Recently closed (unsaved) tab of SQL Sage History. When you close a SQL query tab that has unsaved changes, SQL Sage keeps its text (up to about 1 million characters), the tab name and the server and database it was connected to. Saved, unchanged and empty tabs are not kept. Select one and use Open in new window (Enter), Copy SQL or Remove (Del, with Undo). Nothing is reopened, connected or run by itself. Closed tabs are kept for as long as History keeps queries (30 days by default), and only the last 50.

Passwords and secrets are masked

Before anything is written to disk, in run history and closed tabs alike, SQL Sage replaces only secret values with ?. The rest of your script is kept exactly as you typed it. What counts as a secret:

When a text mentions a secret but cannot be masked safely, its SQL is not saved at all; the entry says “The text was not saved: it may contain a password.” What masking cannot catch: a secret assigned in another batch or another run than where it is used, or assembled in dynamic SQL without any keyword.

Retention, pause and off

History is a convenience, not an audit trail; the audit log is described in Audit log & Export evidence.

For administrators: machine policy

An organisation can control History for every user of a computer with two DWORD values under a key that ordinary users cannot write. SQL Sage reads them when SSMS starts.

HKLM\SOFTWARE\Policies\LumaSoft\SqlSage
  DisableQueryHistory            REG_DWORD  1   History off; the saved history and closed tabs are deleted
  MaxQueryHistoryRetentionDays   REG_DWORD  N   keep history for at most N days

Free and Pro

Recording, search, filters, reopening and Recently closed are Free. On one selected entry, the actions marked (Pro) need a licence: Why is this slower than last time? (AI), Prove ≡ with the editor's query (no AI) and the Query Store card Is this slower than before?. Explain error on a failed entry shows the local catalog check on Free; the AI explanation needs a licence. An AI action sends only that one query, after showing you exactly what will be sent.

07What's blocking now

A query hangs and you want to know who is blocking whom, right now. The Now section of SQL Sage History reads the server's sessions and shows the blocking chains and the long open transactions — including an idle session that left a transaction open, which is easy to miss because nothing is running.

The Now section of the SQL Sage History window in SSMS 22, Dark theme, on AdventureWorks2022, as of 20:21:54 (3 s ago). It sees all sessions (VIEW SERVER PERFORMANCE STATE or VIEW SERVER STATE ✓). Blocking · 1 chain · 1 waiting: session 75, sleeping with a transaction open for 2 min 36 s, is the HEAD BLOCKER, labelled Proven: this SSMS, its batch is in your History: smoke-blocker.sql; session 68 waits on LCK_M_X, blocked by 75. Open transactions over 30 s · 1: session 75, log 188 B, READ COMMITTED. The detail pane shows the blocker's batch (BEGIN TRAN and sp_getapplock) with the buttons Open batch in new window, Script KILL 75 to new window, Copy and Explain with AI, above the note: Nothing runs from here; with Warn on risky F5 on (the default), F5 asks before it runs a KILL. The server, login, host and process id are pixelated.
An idle head blocker (session 75) holding a lock that session 68 waits for. The server, login and host are pixelated.
  1. Open it. The header names the server and database, the time of the snapshot (as of 14:32:05 (8 s ago)) and what your login can see. SQL Sage's own sessions are left out.
  2. Read the chains. Each head blocker is marked HEAD BLOCKER, with the sessions waiting on it, their wait type and how long they have waited. A cycle is marked as one. Below them: open transactions over 30 s, with their age, log use and isolation level.
  3. Select a session to see its batch and details. Open batch in new window (Enter), Script KILL to new window, Copy (Ctrl+C, the snapshot as text) or Explain with AI (Pro).
  4. Press Refresh to read again. Nothing refreshes by itself.

Is it yours?

Each session that is probably yours says how sure SQL Sage is:

No label means no evidence either way; Now never says a session is not yours.

Nothing runs from here

Open batch, Script KILL and the GRANT script each open a new query window and run nothing; they run only if you press F5 there. The KILL script is guarded: it kills the session only if it is still the one that logged in at the time shown, because session ids are reused. When SQL Sage did not get the session's login time, it does not write a KILL script. With Warn on risky F5 on (the default), the F5 Guard asks before a KILL runs. Remember that a KILL rolls back the session's open transaction, and the rollback can take about as long as the work did.

Honest limits

Explain with AI (Pro) sends the frozen snapshot to the SQL Sage chat after showing you exactly what will be sent, masked by your privacy settings; it does not read the server again.

09Find usages of column

Before you change or drop a column, see which procedures, functions, views and triggers write it and which only read it, as SQL Server records it in its dependency catalog.

What the answer shows

The modules are grouped into Writes, Reads and Not determined, with a filter for each. Every row says what the module does with the column (for example writes the column, reads the column via *) and how sure that is:

Tags add detail: also reads, writes all columns (an INSERT without a column list), runs on every write (a trigger on the table), via synonym, dynamic SQL. When unsure, a module is kept in the list rather than left out.

What “not checked” means

An empty or short list never means “nothing writes this column”. Every answer lists what it did not cover:

You can Cancel a long analysis; what was found so far stays, marked partial. Answers are kept in memory for the SSMS session and read again when the database changes.

10Related tables after JOIN

Type JOIN and pause: SQL Sage lists the tables related to the ones already in your statement, each with an alias and the full ON clause. Right after FROM and a table name, it can also suggest a short alias in grey text.

The SSMS 22 query editor, Dark theme, with the line SELECT * FROM Sales.SalesOrderHeader soh JOIN. Under the cursor, the SQL Sage list Related tables · 10: Person.Address a ON a.AddressID = soh.BillToAddressID with its foreign key FK_SalesOrderHeader_Address_BillToAddressID, Person.Address again through ShipToAddressID, then Purchasing.ShipMethod, Sales.CreditCard, Sales.CurrencyRate, Sales.Customer, Sales.SalesPerson, Sales.SalesTerritory and Sales.SalesOrderDetail, each with its alias and ON clause. The footer reads: choose · Tab/Enter insert · Esc close · ≈ = name match, no foreign key.
The related-tables list after JOIN, from the foreign keys of Sales.SalesOrderHeader.
  1. Type JOIN (or LEFT JOIN, INNER JOIN …) and a space, then pause. The list appears under the cursor.
  2. Choose with ↑ ↓ (PgUp PgDn). Tab or Enter inserts the table, its alias and the whole ON clause as one edit; Esc closes the list until the next JOIN. Type a letter instead and SSMS IntelliSense takes over.
  3. If the row also gives the table in FROM an alias, the list's footer says so before you press Tab. Both changes go in as one edit, so one Ctrl+Z undoes both.

Where the suggestions come from

The grey alias after FROM

After FROM, a table name and one space, SQL Sage can show a short alias in grey text, for example Registration r. Tab accepts it as one edit; any other key dismisses it and leaves your text untouched. It appears only in a SELECT, never when the statement already uses the table name before a dot (Registration.Id, where an alias would break the query), and never next to a CTE, a derived table, a table variable, a table-valued function or APPLY. The same rules decide when accepting a JOIN row may alias the table in FROM.

Settings and other add-ins

11Check this database

A one-click, read-only health check of the database in your active query window, which tells you what changed since the last check.

  1. Activate a query window connected to the database you want to check, then choose Check this database.
  2. SQL Sage runs a fixed set of read-only queries (written by us, never by a model): risky database options, parallelism and scoped configuration, the top missing indexes, the most-modified statistics, fragmentation, and — on SQL Server and Managed Instance — backups of this database, failed Agent jobs in the last 24 hours and memory pressure.
  3. Each finding is shown with its evidence. From the second check of the same database on, a line says what changed: Since the last check (3 days ago): 1 new, 1 resolved, 2 unchanged, and new findings are marked New.

Honest limits

For more checks, ask in the chat (see Diagnostics & health).

12F5 Guard

Before a risky script runs, the F5 Guard stops and asks. A read-only query runs at once, without a prompt.

What it asks about

When you press F5 or Execute in a query window, SQL Sage reads what SSMS is about to run (the selection, or the whole window) and checks every statement with the same T-SQL parser SSMS uses. It asks before these:

The script is judged by its riskiest statement across all batches. Since 0.35.3 that includes scripts that repeat a batch with GO n (for example GO 5), which before then could hide a risky statement. Statements inside IF, BEGIN … END and TRY … CATCH blocks count too.

The warning

  1. A dialog shows DANGER, the reason (for example DELETE has no WHERE clause — it removes EVERY row in the target table.), the server and database the script will run against, and the SQL.
  2. Cancel is the default button: Enter or Esc does not run the script. Run anyway runs it.
  3. Don't warn again in this session, ticked together with Run anyway, silences the guard until SSMS restarts.
  4. Show impact (Pro) closes the dialog without running and places a change-impact request in the chat box; nothing goes to the AI until you press Send.

Audit entry. With Audit SQL on (the default), each warning is written to the local audit log with your decision (run or cancelled), the server, database and login, the risk and the SQL, with passwords and other secret values replaced by ?. The entry is written in the background, so F5 never waits for it.

Honest limits

13Format, expand, qualify, execute

Four editor commands under SQL Sage Tools (right-click in a query window, or the Tools menu). They are enabled when the active query window has text. Each change is one edit, so one Ctrl+Z undoes it, and it is applied only if your text did not change while SQL Sage worked on it. All four are Free and send nothing to the AI.

Expand and Qualify work on the selection, or else on the statement under the cursor. They read the schema of the window's database: in a window that is not connected they say so in the status bar, and right after connecting they may ask you to try again in a moment while the schema loads. All of them keep GO lines exactly as written, including a repeat count such as GO 35.

14Keyboard shortcuts

The classic shortcuts below follow the keys many DBAs already know from Redgate tools. SQL Sage adds them when SSMS starts, and steps aside when another add-in owns them: the editor shortcuts are not added while Redgate SQL Prompt is installed (and are removed again if SQL Sage had added them), and Ctrl+Alt+D is not added while Redgate SQL Search is installed. A shortcut you changed or removed yourself is left alone. Every command stays in the menus either way. All of them except Ctrl+Alt+D work in a query window.

KeysWhat it doesPlanSteps aside for
Ctrl+Alt+DSQL Sage Search (Find object…), anywhere in SSMSFreeRedgate SQL Search
Ctrl+Shift+XSQL Sage HistoryFreeRedgate SQL Prompt
Ctrl+B, Ctrl+WExpand wildcards (SELECT *)FreeRedgate SQL Prompt
Ctrl+B, Ctrl+QQualify object namesFreeRedgate SQL Prompt
Ctrl+K, Ctrl+YFormat SQLFreeRedgate SQL Prompt
Shift+F5Execute current statementFreeRedgate SQL Prompt
Shift+Alt+ZAsk SQL Sage: Explain selectionPro (AI)Redgate SQL Prompt
Shift+Alt+RAsk SQL Sage: Fix selectionPro (AI)Redgate SQL Prompt
Ctrl+Alt+ZAsk SQL Sage: Optimize selectionPro (AI)Redgate SQL Prompt

These are always there (they are not classic shortcuts, so they never step aside):

KeysWhat it doesPlan
Ctrl+Alt+Shift+E / F / O / DAsk SQL Sage: Explain / Fix / Optimize / Document the selectionPro (AI)
Alt+.Ask the AI for an inline suggestion at the cursor — only with Inline suggestions turned on in the panel's Settings (off by default). It sends the text around the cursor to your AI provider.Pro (AI)
TabAccept the grey alias after FROM, insert the chosen row of the JOIN list (Enter works too), or accept an inline suggestion. With nothing on screen, Tab is an ordinary Tab.Free (inline suggestions: Pro)
EscDismiss the JOIN list, the grey alias or an inline suggestionFree

Inside the SQL Sage windows

WindowKeys
SQL Sage HistoryEnter open in new window · Ctrl+Enter insert at cursor · Ctrl+C copy SQL · Del delete · ↓ from the search box to the list · Esc back to the query window
SQL Sage SearchEnter insert name · Ctrl+Enter script to new window · Ctrl+C copy name · F3 / Shift+F3 next / previous hit · Shift+F12 find usages of column · Alt+← back · Esc back to the query window
JOIN list↑ ↓ PgUp PgDn choose · Tab / Enter insert · Esc close

A shortcut does nothing? Another add-in may own it (see above), or another command may already use the same keys; check the keyboard settings under Tools › Options. In an SSMS with a non-English user interface the classic shortcuts may not be added at all; the menu entries still work.

15Free and Pro

SQL Sage has two kinds of features. The Free ones keep working after the trial and without a licence. The ones marked (Pro) in the menus and windows need a licence, or the trial. SQL Sage Free makes no AI (LLM) calls: everything that sends something to an AI is Pro. Two Pro checks, Prove-It and Is this slower than before?, are worked out by code without any AI call, and they are paid all the same.

(Pro) is about the licence, not about one plan: every paid plan — Personal, Team 3 or Team 10, one-time or subscription — includes every Pro feature. The plans differ in the number of seats. A one-time licence includes every update through version 1.x (plus 2.0 if it ships within 12 months of your purchase); a subscription always includes the latest version. See pricing. AI usage is not included in any plan: the AI features run on your own Claude or ChatGPT plan, or on your own Anthropic API key.

FeaturePlanSection
AI chat, the Ask SQL Sage actions (Explain, Fix, Optimize, Document) and every AI explanation (Explain error, Incident triage, Why is this slower than last time?, Explain with AI in Now)ProThe chat
AI inline completions (Alt+.)ProInline completions
F5 Guard: a warning before a risky F5FreeF5 Guard
Related tables after JOIN, the JOIN … ON suggestion and the grey alias after FROMFreeRelated tables after JOIN
Format SQLFreeEditor commands
Expand wildcards (SELECT *)FreeEditor commands
Qualify object namesFreeEditor commands
Execute current statementFreeEditor commands
Explain error: the proven part (the catalog check)FreeExplain error
Check this databaseFreeCheck this database
SQL Sage History, with Recently closed (unsaved)FreeSQL Sage History
SQL Sage SearchFreeSQL Sage Search
Find usages of columnFreeFind usages of column
What's blocking nowFreeWhat's blocking now
Change-ImpactProChange-Impact
Incident Mode (the incident snapshot)ProIncident Mode
Prove-It (Prove ≡)ProProve-It
Is this slower than before? (the Query Store card)ProIs this slower than before?

Not tied to a plan: the audit log and Export evidence, Mask names, the privacy switches and Copy diagnostics work in every plan.

16Getting started, trial and licence

The first time you open the SQL Sage panel it shows Getting started, a three-step checklist. A plan pill in the chat header shows your trial, Free or paid plan at all times.

Getting started in three steps

  1. Check this database — Free, read-only, no AI, about 10 seconds. It needs a query window connected to a database (Check this database).
  2. Connect an AI — SQL Sage looks for Claude Code, the Codex CLI and a saved API key on this computer and offers three ways: a ChatGPT account via Codex, Claude Code (it needs a Claude plan that includes it), or your own API key (pay per use). It says what each one costs you and copies the exact install command; it never runs an installer for you.
  3. First answer — ask about this database, or start from an example.

Next to step 1, Getting started has buttons for three Free tools that need no AI: What's blocking now, SQL Sage Search (Ctrl+Alt+D) and SQL Sage History. They open the same windows as the menu commands and stay free after the trial, so you can use them before you connect an AI. On SQL Sage Free the list shows every Free tool and how to reach it.

Step 2 shows each of the three ways with what SQL Sage found, for example Claude Code not found on this computer., Codex CLI found - sign in with your ChatGPT account. or Ready - signed in., and a button for the next move: Copy install command, Open install page, Sign in to Claude Code, Sign in with ChatGPT or Set API key. A Codex CLI that is too old for its models is named with the version SQL Sage needs, next to Copy update command. The way the chat uses says Chat uses this.; another way that is ready offers Use this for chat. The one-time note that your schema and SQL go to an external AI provider is shown here, where you choose one, until you close it or send your first message to the AI.

While Getting started is on screen, an AI request from a Free tool's result — Explain the top finding, or an AI button in SQL Sage History — sends nothing if the chat's AI cannot answer yet (its CLI is not installed or is signed out, or your own API key has not been saved). The panel shows step 2 instead, with the line Connect an AI first: step 2 below. Nothing was sent.

To find them, SQL Sage looks for the CLI programs in the places listed under Claude Code or the Codex CLI is not found, asks each CLI's own sign-in status command, and for an API key checks only that one is saved. It never reads a token, a credential file or the key. After you install or sign in, come back to the panel: SQL Sage notices by itself. On SQL Sage Free, Getting started shows only step 1, because AI is not part of the plan.

The trial

The 30-day trial starts with your first AI answer, or 14 days after you first open the SQL Sage panel, whichever comes first. Until then everything is open, so installing early or using the Free tools does not use up trial days. A trial that started before version 0.28.0 keeps its dates. The trial includes every feature and needs no credit card. Setting the computer's clock back ends it.

When the trial ends, SQL Sage keeps working as SQL Sage Free: the Free tools stay, and the AI features and the Proven & Accountable checks need a licence (see Free and Pro). The same happens when a licence ends. There is no lock screen: the panel shows a SQL Sage Free card. After a trial it says Your 30-day trial has ended. The editor tools keep working, free., then what you used in the trial (for example In your trial: 23 AI answers · 2 proofs, only what is above zero), the Free tools, what a licence gives, the price for this version ($39 once (updates through 1.x) or $29/yr; the checkout shows your final price) and that AI usage is not included, because it stays on your own Claude or ChatGPT account. The card offers Buy SQL Sage first, then Enter license key.

The plan pill and its details

The plan pill reads, for example, Trial · starts with first AI answer, Trial · 12 days left, Pro, Pro · offline, 3 days or Free. Click it to see:

Enter a licence key

  1. Click Enter license key (in the trial banner, the plan details or the SQL Sage Free card).
  2. Paste the key from the purchase e-mail. If a SQL Sage key is on the clipboard, the window offers Use the key from the clipboard; it never activates it by itself.
  3. Click Activate. A problem is shown as one line in the window, for example when the key looks cut off. On success the window closes and the plan changes at once, with no restart.

The key is checked on this computer; SQL Sage then confirms its status online over HTTPS, sending only the licence identifier, never the key.

When the licence is checked online

SQL Sage checks an installed licence online over HTTPS when SSMS starts and loads SQL Sage, when the SQL Sage panel starts, after you enter a key and about every 12 hours while SSMS stays open, sending only the licence identifier. The check when SSMS starts runs even if you only use the editor and never open the panel; a panel that opens moments later uses its answer instead of asking again, and without a network the check is sent later, once Windows reports a network again. It also checks once more when the licence state changes — a subscription entering its offline grace period, or a paid plan that stops being paid — at most once every 10 minutes. The 12-hour and the extra checks are new in 0.36.0; earlier versions check only when the SQL Sage panel starts and after you enter a key. Up to 0.36.0 the first check waits until the SQL Sage panel starts.

A refunded or revoked licence stops the AI features from your next AI request; an answer that is already running is never interrupted. A renewed subscription is picked up while SSMS stays open, without a new key or a restart. When the licence server does not answer (offline, a time-out, or, since 0.35.6, a redirect), SQL Sage keeps your current licence state and tries again later, first after 30 minutes.

A subscription that passes the date it is valid through, and whose renewal cannot be confirmed online, keeps the AI features for up to 14 days. The panel then says Couldn't confirm your subscription online. AI keeps working until … with the date, instead of saying it expired. Since 0.36.0 that message ends with Check now: click it to check at once. It shows Checking…, and when the licence server does not answer within 5 seconds, Couldn't reach the license server — still working until …; your licence state stays as it was.

17The chat: Agent and Ask

The chat answers in the context of your query window's connection (see Everyday use). Under the message box are the mode button, the model and effort button, a token count, the privacy shield and Send.

The SQL Sage panel in SSMS 22, Dark theme, in Ask mode. A system note reads: Ask mode — answers from what is attached; runs nothing on the server. Claude answers a question about the attached query and ends by saying it cannot check the index in Ask mode, but Agent mode can run get_schema to confirm. Above the message box the attached file chip and the chip Query → Claude; below it the buttons Ask and Opus · Auto, the token count 64.5k tok, the privacy shield and Send.
Ask mode: the chip says Query → Claude, and the answer says what it could not check without tools.

Agent and Ask

The mode button switches the chat between two modes:

Ask works with Claude Code and with your own Anthropic API key. Ask is not available with the Codex CLI: Codex also loads the tools (MCP servers) set up in your own Codex settings, so SQL Sage cannot guarantee that a Codex turn runs no tools. The mode menu shows Ask as unavailable with that reason, and nothing is sent if you try.

Model and reasoning effort

The button next to the mode (for example Opus · Auto) chooses the model and how hard it thinks. The list comes from the AI you use — your Claude Code or Codex CLI on this computer, or Anthropic for your own key — and only the effort levels the model supports are offered. SQL Sage never switches you to a more expensive model on its own.

To change the effort for one answer, type /effort high (or /effort auto) and press Send: it applies for the next answer only, and nothing is sent to the AI. /effort alone lists the levels of the selected model.

Bounded answers

An answer takes at most 12 steps (tool calls) on every provider. It also stops after 10 minutes on Claude Code and the Codex CLI; with your own API key only the step limit applies. When a limit is reached, SQL Sage keeps what was written so far and ends with Stopped after 12 steps — ask me to continue. (or Stopped after 10 minutes …). Reply continue to carry on from there.

Include results (opt-in)

Query results — your row data — stay on this computer unless you turn on Include results under the privacy shield next to Send and agree to a prompt. It is off by default.

  1. Turn on Include results under the shield.
  2. Right-click in a query window › Explain copied results (exactly what you copied from the grid) or Attach query results (re-run).
  3. A dialog shows how many rows and columns, the connection and the provider, and says that the cell values are not masked. Cancel is the default button; Send results sends them.
  4. Ticking Don't ask again for this session stops the prompt for this session, and also lets the AI run its own read-only queries on this connection and see their row values.

The consent is bound to the server, the database and the AI provider: it ends when any of them changes or when you turn Include results off, and has to be given again. Results you shared with one provider are not sent to another after you switch; they stay withheld until you choose Share previous results with …. Without the consent, a query the AI wants to run on your tables is not run: the AI sees only its column names and types.

What leaves this computer

The chip above the message box names what your next message sends and where: Schema + query → Claude in Agent mode with a query attached, Query → Claude in Ask mode, Schema + query + results → … after you shared results, Message → Claude when only your message goes, and → your endpoint with your own API key. Click the (i) next to it for the full list. In short:

The bottom of the SQL Sage chat panel in Agent mode: the attached query file explain-error-demo.sql (6 lines), the chip Schema + query → Claude, the empty message box reading Ask about this database — / for commands, and the buttons Agent and Opus · Auto, the token count 46.1k tok, the privacy shield and Send.
Agent mode with a query attached: the chip reads Schema + query → Claude.

The token count and large requests

The number next to the shield, for example 46.1k tok, adds up the tokens your AI provider reports for the answers in this chat: input, output, and cached input read and written. It is approximate, and it counts cached input at full size, so it shows how much the chat carries rather than what it costs; the billing is your Claude or ChatGPT plan's, or Anthropic's for your own key. It appears after the first answer and starts again from 0 when you open another chat or restart SSMS; it is not saved.

Before a message is sent, SQL Sage estimates the size of what it put together — your message, the attached query and files, and any results you share — at about 4 characters per token. Over 40,000 tokens it asks first: This operation will use about … input tokens from your plan limit (threshold …). Continue? Cancel sends nothing and puts your message back in the box. The estimate does not include what the AI's tools read during the answer.

Saved chats

Chats are saved on this computer, so you can go back to one after SSMS restarts: pick it in the chat list at the top of the panel (switching waits until an answer has finished), or start a new one with the New chat button (+) next to that list. Delete this chat in the panel's Settings (⚙) deletes the open one.

18Connect repository (preview)

Connect your application's source folder to the chat, so Claude can read the code that uses your database next to its schema: where a query is built, what calls a procedure, how a table is used. It is a preview: it reads and searches code, and it does not yet prove which line of code produced a given query.

  1. Activate a query window connected to the database the code uses, with Claude selected for the chat.
  2. Click + next to the message box › Connect repository… and choose the folder.
  3. The dialog SQL Sage — connect repository? shows the folder and the provider and says what is sent. Cancel is the default. Connect connects at once: nothing is copied or indexed.
  4. A chip with the folder name appears next to the message box. Ask as usual; Claude looks into the code when the question needs it.

The repository is tied to the server and database of that query window. Disconnect with ✕ on the chip, or + › Disconnect repository (…). SQL Sage only reads your folder and never writes to it. The access ends when SSMS closes; after a restart, connect again.

How Claude reads the code

In every turn SQL Sage starts, Claude Code's own file, shell and search tools are switched off. With a repository connected, Claude gets SQL Sage's read-only repository tools instead, and they are its only way into the folder:

The tools read the live folder — nothing is copied — and stay inside it: an absolute path, a .. that leaves the folder, and symbolic links and junctions are refused. With Mask names on, the names it covers are replaced in what these tools return too.

What is never returned

Honest limits

19Explain error

When a query fails in a query window, a bar at the top of that window says SQL Sage: the query failed - Msg 207: … with an Explain error button. SQL Sage first checks the error against your database and shows what it can prove; with a licence, the AI then explains the cause and returns a fixed query.

The SQL Sage panel in SSMS 22, Dark theme, connected to AdventureWorks2022 (READ-ONLY), explaining a failed query: the cause is a typo, CustmerID is missing an o, so SQL Server stopped with Msg 207. Under What I checked: checked against the catalog, Sales.Customer has no column CustmerID and the closest real column is CustomerID; checked with get_schema; and one assumption that is not checked. Then the fixed query in a READ block with Copy, Insert, New query, Run, Format and Prove ≡. Below, the chip Schema + query → Claude and the buttons Agent and Opus · Auto. The server name is pixelated.
An AI explanation after the catalog check: what was checked, what was assumed, and the fixed query. The server name is pixelated.

What it proves

From the database's catalog, the T-SQL parser and the server's message templates: the missing column and the closest real name, the foreign key or CHECK constraint behind error 547, the key columns behind a duplicate key, the column size behind a truncation, the parser's position of a syntax error, and the template of the message from sys.messages. Each fact is marked Proven, Inferred or Not checked. When a query cannot be analysed, the card says so.

What is withheld before anything is shown or sent

20Change-Impact, Incident Mode, Prove-It

The Proven & Accountable checks. Their facts come from SQL Server itself, read by queries SQL Sage wrote rather than the AI, and every one of them only reads.

Change-Impact

What breaks if you ALTER or DROP an object, before you do it. Start it in one of three ways:

It reports, from the catalog of the current database: the rows at risk (the live row count, the data a DROP loses), the views, procedures, functions, triggers and constraints that reference the object, the foreign keys that point at it, and its indexes. A name without a schema resolves the way SQL Server resolves it: your default schema, then dbo. When the object does not exist, the answer says NOT FOUND instead of showing an empty list.

Honest limits. These lists are read from the catalog, not guessed, and the AI is asked to cite them; its summary is still an AI answer. It is static analysis: it cannot see dynamic SQL, application or ad-hoc queries (ORMs, jobs, reports), or references from other databases and linked servers, so an empty list means no static references were found, not that nothing breaks. The row count needs VIEW DATABASE STATE. It runs inside an AI answer, on your own plan.

Incident Mode

For “the server is slow right now”. Choose Tools › SQL Sage Tools › Incident triage (also in the panel's Settings) with a query window connected to that server. SQL Sage sends a fixed triage request; the AI first takes an incident snapshot and cites it for each conclusion. It runs inside an AI answer, in Agent mode only — not in Ask mode, which never reads the server.

The snapshot reads, in one pass: the blocking tree with the head blockers first — including an idle session that left a transaction open — the most expensive requests in flight, the top waits with their share, and on SQL Server a tempdb and log space signal. It reads server state (DMVs), never rows from your tables, and each read waits at most 5 seconds. What it reads includes other people's sessions — logins, client machines, programs and the SQL they run — which go to the AI with literal values replaced (unless you shared results) and with names replaced when Mask names is on. The audit log records Incident Mode by name, without its SQL.

Honest limits. It is a point-in-time snapshot: it shows now, not history, and wait counters count since the server started. Your login needs VIEW SERVER STATE (on SQL Server 2022 and later, VIEW SERVER PERFORMANCE STATE is enough); without it the snapshot says blocking is unknown and names the missing permission. On Azure SQL Database it covers the connected database only (VIEW DATABASE STATE), and running requests are visible only for your own connection, so “no blocking” there is not proof. For a free look without AI, use What's blocking now.

Prove-It

Did the rewrite change the result? On a SQL block the AI wrote, click Prove ≡. It compares the block with your original query: the selection in your active query window, or its whole text. A SQL Sage History entry has the same check, Prove ≡ with the editor's query, for READ entries.

A SQL block in the SQL Sage chat with a green READ badge and the buttons Copy, Insert, New query, Run, Format and Prove ≡, above a SELECT TOP (10) CustomerID, AccountNumber FROM Sales.Customer ORDER BY AccountNumber with a comment that it is a SQL Sage demo.
Every SQL block the AI writes carries Prove ≡.

SQL Sage runs both queries read-only inside one transaction that it always rolls back, compares a server-side fingerprint of the rows (order-independent, duplicates counted) and the logical reads, and answers EQUIVALENT, DIFFERENT or UNDECIDABLE, with the reason. The verdict is worked out by code, uses zero AI tokens, is shown only in the panel and is written to the audit log. A sample of the rows that differ is shown only with the results consent.

Honest limits. The proof covers your current data, not all possible data, and the order of the rows is not proven, even with ORDER BY. It proves one SELECT: a query with a leading WITH (CTE), several statements or SELECT … INTO is refused, and so are nondeterministic queries (GETDATE, NEWID, TOP without ORDER BY, TABLESAMPLE) and remote ones (OPENROWSET, OPENQUERY, OPENDATASOURCE) — those get UNDECIDABLE with the reason, never a guess.

21Is this slower than before?

For a query you ran, the card asks Query Store whether the statement got slower and why: a new plan, more lock waits, or the same plan running slower. The verdict is worked out by code from Query Store's own numbers, with no AI.

Before you start

How the query is found

SQL Sage compiles the entry's estimated plan (it is not executed; compiling can trigger an automatic statistics update) and looks up each statement's query_hash in Query Store. The statement text is compared by SHA-256 on the server, so the stored text is not read back. Every line of the card says how sure it is:

The comparison uses the server time of completed runs over the last 7 days (aborted and failed runs are left out) and needs at least 5 regular runs of each plan. It can say: slower or faster since the plan changed, outside normal variability; the plan changed with no clear difference; too few runs to compare; the same plan with more lock waits (likely blocking, not the plan); the same plan, slower in the latest interval (more data, other parameter values or load); or no plan change. A verdict is never stronger than the link it rests on. Your own client time from History is shown on its own line.

On the card

22Audit log and Export evidence

SQL Sage keeps a local record of the queries it runs or blocks, so you can show later what the AI and the guards did on a server.

What it records

The AI's reads, the writes and DDL you confirm or cancel, Run, Prove-It runs, results you shared and the F5 Guard's warnings with your decision — each with the server, database, login, classification, the SQL, the row count and the model that acted. What is not logged is listed under Safety & privacy.

What the file is

Tamper-evident, not tamper-proof

Each entry stores a SHA-256 hash of the previous entry's hash and its own content, so recomputing the chain shows when an entry inside a day's file was changed, removed or reordered. The chain has no secret key: anyone who can write to your profile can rebuild it, and it cannot show a deleted file or missing newest lines. It is evidence for a review, not a certified compliance record.

Export evidence

Export evidence… exports today's audit file only — today by UTC date — as a Markdown file and a JSON file side by side: every entry with its classification and approval, and the chain's verdict (intact, or the entry where it breaks). The pack names this computer and your Windows user name. With Mask names on, the server and database names in it are replaced; logins and the SQL are not. For another day, take its file from Audit folder.

23Mask names

Mask names replaces real names with placeholders in what SQL Sage sends to the AI provider, so the provider sees <server>, <database> or <login1> instead. A name keeps the same placeholder for the whole chat.

What it masks

It fails closed

To know what to replace, SQL Sage reads the server's list of names: before the first tool of a chat runs, and once per window connection for inline completions. If it cannot read them, nothing is sent: the chat tool does not run and says why, and no AI completion is sent (the status bar says why).

What it does not mask

24Inline completions (Alt+.)

An AI suggestion at the cursor in a query window, shown in grey: Tab accepts it as one edit, Esc dismisses it, and any other key leaves your text as it is. Off by default.

When a suggestion is requested

SQL Sage uses the first of these it finds on this computer, whichever provider the chat uses: Claude Code, then the Codex CLI, then your own Anthropic API key.

Masking and honest limits

25Diagnostics & health

Just ask in plain language — SQL Sage runs the right server-side check itself (authored, deterministic queries; the model interprets the numbers, it doesn't invent them):

Every fix (reindex, UPDATE STATISTICS, CREATE INDEX, ALTER DATABASE) is presented as a script for you to review and run — never executed automatically.

26Safety & privacy

Full details in the Privacy Policy.

27Skills

SQL Sage ships reusable expert playbooks (deadlock-triage, blocking-triage, index-tuning, query-regression, db-health-review). They use the open Anthropic Agent Skills format (SKILL.md), and SQL Sage also reads your personal ~/.claude/skills folder — the same one GitHub Copilot in SSMS and Claude Code use, so a skill you write works across all three. Drop a SKILL.md in %USERPROFILE%\.claude\skills\<name>\ and it appears automatically.

28Troubleshooting

“Error 4551”, or Smart App Control blocked the installer

Since 0.21.0 the installer is signed end to end by LUMA SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ: SqlSageSetup.exe, the setup program it unpacks to your %TEMP% folder and runs, the uninstaller and the SQL Sage DLLs. Installers of version 0.20.5 and earlier left that unpacked setup program unsigned, so Smart App Control, or an App Control for Business (WDAC) policy, could stop the installation with “Error 4551”. If you see it, you are running an old installer: download the current one from the download section and run it again. If your organisation's App Control policy still blocks it, ask your administrator to allow the publisher (see Publisher and signature).

“Windows protected your PC” / SmartScreen on install

SmartScreen judges a file's download reputation, not its signature, so it can warn about a new release even though the installer is Authenticode-signed and timestamped by LUMA SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ. Click More info and check that Publisher shows that name (an unsigned file would read Unknown publisher; any other name: do not run it), then Run anyway. To check the file itself, compare Get-FileHash SqlSageSetup.exe -Algorithm SHA256 with the SHA-256 published in the download section.

The installer asks for administrator rights, or nothing seems to happen

The installer writes to SSMS's folder under Program Files, so it needs administrator rights. After you start it, it starts itself a second time with administrator rights, and that is when Windows shows the UAC prompt — two setup processes for a moment are expected. If you answer No, or the prompt stays hidden behind another window and you close the installer, nothing is installed: run SqlSageSetup.exe again and approve the prompt. If SSMS is still open, the installer asks you to close it: close every SSMS window, then click Retry. Retry checks again and goes on only when SSMS is closed; Cancel stops without installing anything. (Installers of 0.35.7 and earlier continued without checking again.)

Claude Code or the Codex CLI is not found, or “Failed to start Claude CLI”

Only the AI features need Claude Code or the Codex CLI (or your own Anthropic API key); the Free tools need neither. While Getting started is shown, its step 2, Connect an AI, looks for them again each time you come back to the panel, so a CLI you install while SSMS is open is usually found without a restart (Settings ⚙ › Getting started brings the card back). SQL Sage looks in these places, in this order:

SSMS keeps the PATH it was started with. If the CLI is somewhere else — for example in a folder that was added to PATH while SSMS was open — restart SSMS once so that it sees the new PATH. Found but not signed in: use the sign-in button in Getting started and finish in the console window. If it was working and stopped, your CLI session may have expired: sign in again.

At the end of setup, the installer tells you when it found neither CLI. It looks in the same places as the panel (the list above), but only for the account that runs setup — an administrator account, or SYSTEM under a deployment tool — so the message can appear although your own account has a CLI. The message is informational; the installation is complete. Trust what Getting started says: the panel looks again for each Windows user. (Installers of 0.35.7 and earlier looked only for claude.exe and codex.exe on the PATH, so a CLI installed with npm — claude.cmd, codex.cmd — brought the message up as well.)

Proxy, firewall or no internet

Azure SQL: SQL login and Microsoft Entra

When a query window is open, SSMS hides the password of its connection, so SQL Sage signs its own sessions in with the window's credentials, kept in memory only and never written to a connection string or a log. Since 0.31.1 this works for SQL Sage Search and the JOIN list, and since 0.32.1 for the chat's tools, with a SQL login, Microsoft Entra Password or Service Principal. If those fail on an older version, update.

The other Microsoft Entra methods are mapped to the matching sign-in: MFA (Universal) and Interactive to Interactive, which uses SSMS's own sign-in, and Integrated, Managed Identity and Default to themselves; Device Code and any method SQL Sage does not know fall back to Entra Default, which reuses a cached Azure sign-in. Not every Entra variant has been verified on SSMS 22 yet — if yours does not connect, send us Copy diagnostics. Since 0.33.2, with Mask names on, SQL Sage no longer reads sys.master_files on Azure SQL Database (error 208 at the start of a chat).

Now or Incident Mode says blocking is unknown

To see other sessions, your login needs VIEW SERVER STATE — on SQL Server 2022 and later, VIEW SERVER PERFORMANCE STATE is enough. On Azure SQL Database the database user needs VIEW DATABASE STATE in the user database (not in master); on Basic, S0, S1 and elastic pools only the server admin, the Microsoft Entra admin or a member of ##MS_ServerStateReader## can see them. Without the permission, SQL Server silently shows only your own session, so SQL Sage says blocking is unknown rather than zero. What's blocking now offers Copy GRANT script to new window for a DBA to review and run; SQL Sage never runs it. The same permission applies to Incident Mode.

SQL Sage Search says “Not indexed yet” or “No query window is connected.”

Search reads the server of your active query window. No query window is connected. means it has no connected window to follow: click into a query window that is connected, or press Ctrl+Alt+D there. Not indexed yet means the first read of that server has not finished; once it starts, the status line shows Indexing N/M databases. Since 0.31.2 a Search window that SSMS restores when it starts follows the active query window by itself. While a search is on screen, Search never switches to another server silently: click Use <server>. Refresh reads the changed databases again. More: SQL Sage Search.

The assistant doesn't know my server/database

Make sure a query window is connected and active, or pin the chat to it (📌). The connection bar at the top of the panel always shows which server/database the answers use.

The panel didn't open

Open it from View → Other Windows → SQL Sage. If it's missing, restart SSMS once after installing so it merges the extension.

Right-click actions aren't in the menu

Restart SSMS once after an update so the menu re-merges. The actions are also under the Tools menu.

Trial / licence

The 30-day trial, with all features and no credit card, starts with your first AI answer or 14 days after you first open the panel. A licence check that cannot reach the server keeps your current state; a subscription past its end date keeps AI for up to 14 days while the renewal cannot be confirmed. Details: Getting started, trial & licence.

An answer ends with “Stopped after 12 steps — ask me to continue”

Every answer is bounded: at most 12 steps (tool calls) on every provider, and 10 minutes on Claude Code and the Codex CLI. When a long investigation hits the bound, SQL Sage keeps what was written so far and stops the run. Reply continue to carry on from there.

How to report a problem

Click Copy diagnostics in the panel's settings row. SQL Sage first shows the whole report (“This is what will be copied”) and copies it only when you click Copy to clipboard. It lists the SQL Sage, SSMS, Windows and CLI versions, the provider, model and effort, your plan, the update and policy state, the panel switches and the last 20 lines of the local diagnostic log reduced to time, component and numbers. It contains no licence key, e-mail, SQL text, query results, server or database names, or error message text, and nothing is sent automatically. Paste it into GitHub Discussions or an e-mail to support@lumasoft.pl together with what you did and what you expected. If you add a screenshot or a query, remove server, database and login names, data and passwords from it first — GitHub Discussions is public.

Where the logs are

SQL Sage writes a diagnostic log to %LOCALAPPDATA%\SqlSage\diag.log only when something fails (for example, the panel does not start), or for a support session when the environment variable SQLSAGE_DIAG is 1 when SSMS starts. To turn the full trace on: set the user environment variable (for example setx SQLSAGE_DIAG 1 in a command prompt), start SSMS again, reproduce the problem, then delete the variable — it is read once, when SSMS starts. The full file can contain SQL text, server, database and object names and error messages, so read it before you share it and send it only when support asks; Copy diagnostics includes only its last 20 lines, reduced to time, component and numbers. The local audit log is in %LOCALAPPDATA%\SqlSage\audit\ (Audit log).

Still stuck? See the FAQ on the home page.

29Update & uninstall

Update: the panel checks for new versions and shows a dismissible banner; its Download button opens the latest signed installer — close SSMS first, then run it (it replaces the previous build, and asks you to close SSMS if it is still running). Nothing is installed silently. The panel checks when it starts and then about every 6 hours; Check for updates checks now, and the Check for updates automatically switch turns the automatic checks off. What changed in each version, including security and privacy fixes: see the changelog.

Minimum supported version: we may set a minimum supported version of SQL Sage, for example when an AI provider or a security fix requires it. A version older than the minimum supported version may stop working, in whole or in part, until you update it; the update is free under your licence. Unless a security fix needs it at once, the panel first shows Update required by … with the date, and everything keeps working until then; after it, the panel shows only the update card, and the F5 Guard warnings keep working. While perpetual licences limited to version 1.x exist, the minimum supported version is never higher than the latest 1.x release. The rule is in section 11 of the Terms.

Uninstall:

  1. Close SSMS.
  2. Open Windows Settings → Apps → Installed apps (Windows 10: Apps & features), find SQL Sage for SSMS 22 (publisher LumaSoft) and choose Uninstall. The same uninstaller is also at C:\Program Files\Microsoft SQL Server Management Studio 22\Release\Common7\IDE\Extensions\SqlSage\unins000.exe.
  3. The uninstaller removes the extension files and refreshes SSMS's extension registration, so SSMS no longer loads SQL Sage.

Your own data is not deleted: settings, saved chats, SQL Sage History with its recently closed tabs, the audit log, the database-check results, the usage counters and the licence and trial files stay under %LOCALAPPDATA%\SqlSage, and two trial dates stay in the registry under HKCU\Software\LumaSoft\SqlSage. Delete that folder if you want them gone (it also removes your stored licence key). The full list is in the Privacy Policy; uninstalling for a whole organisation: For IT.

AI usage not included: SQL Sage needs your own AI access (Claude Code on a paid Claude plan, a ChatGPT plan that includes the Codex CLI, or your own Anthropic API key). See pricing

Download SQL Sage

30For IT and administrators

What SQL Sage puts on a computer, what it connects to, what it keeps on disk and what an organisation can control today. For the full list of local files and network requests, the Privacy Policy is the reference.

What the installer installs, and where

Publisher and signature

Since 0.21.0 everything the installer runs or installs from us is Authenticode-signed and timestamped: SqlSageSetup.exe, the setup program it unpacks to %TEMP%, the uninstaller unins000.exe and the SQL Sage DLLs. The signer is LUMA SPÓŁKA Z OGRANICZONĄ ODPOWIEDZIALNOŚCIĄ (LUMA sp. z o.o., Warszawa, PL), with a code signing certificate issued by Certum (Certum Code Signing 2021 CA) and a Certum timestamp. Check a file with Get-AuthenticodeSignature in PowerShell. Every release is a new file, so an App Control policy that should let updates through needs a publisher (signer) rule, not a file-hash rule. The SHA-256 of the current installer is published in the download section and in version.json.

Unattended (silent) install

The installer is built with Inno Setup and takes its standard switches. Run it with administrator rights (an elevated command prompt, or a deployment tool that runs it as SYSTEM); started without them, it asks Windows for them, and no switch hides that UAC prompt.

SqlSageSetup.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /LOG="C:\Windows\Temp\SqlSageSetup.log"

With /SUPPRESSMSGBOXES each of the installer's own messages takes a fixed answer instead of waiting for a click:

Exit code 0 means installed. Exit code 1 means setup stopped before installing; the log file records which message caused it. Any other non-zero code is one of Inno Setup's standard exit codes. No restart is needed. Installers of 0.35.7 and earlier showed these three messages with a plain message box, which is not suppressed by /SUPPRESSMSGBOXES and waits for a click even with /VERYSILENT: use a later installer for an unattended install.

The fixed answers and exit codes were checked against Inno Setup's documentation and in a test setup that installs nothing; the SQL Sage installer itself has not been tested end to end on a deployment tool (Intune, Configuration Manager and the like). There is no MSI package.

Uninstall

Close SSMS, then uninstall SQL Sage for SSMS 22 from Windows Settings › Apps, or run unins000.exe from the install folder above. Without prompts: unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART (the uninstall script shows no messages of its own; not tested unattended). The uninstaller removes the extension files and SSMS's registration. Each user's data stays in %LOCALAPPDATA%\SqlSage, and two trial dates in HKCU\Software\LumaSoft\SqlSage; delete both per user to remove everything, including the stored licence key.

Network endpoints

These are all the requests the extension itself makes to our servers. None of them carries a name, an e-mail, a device identifier, a query, schema or results.

AddressWhenWhat it carries
https://sqlsage.lumasoft.pl/version.jsonUpdate check: when the panel starts, about every 6 hours, and on Check for updatesNothing; a static file
https://sqlsage.lumasoft.pl/models.v2.jsonWhen the panel starts, when you switch provider, and for inline completionsNothing; a static, signed list of models
https://api.lumasoft.pl/license/validateFor a paid licence: when the panel starts and after a key is entered; since 0.36.0 also about every 12 hours while SSMS stays open, when the licence state changes (at most once every 10 minutes) and on Check now; after 0.36.0 also when SSMS starts and loads SQL SageThe licence identifier only, never the key
https://api.lumasoft.pl/dl/hitOnly when someone clicks Download in the update bannerThe product name, for an anonymous download count
https://sqlsage.lumasoft.pl/download/SqlSageSetup.exeOpened in the browser by that Download buttonThe installer
https://sqlsage.lumasoft.pl/models.jsonOnly by SQL Sage 0.19.x and earlierNothing; a static file

They use the Windows proxy settings, and these host names stay as they are for every installed version, also after the website itself moves to sqlsage.lumasoft.org: they answer directly and never redirect. AI requests do not go through us. Claude Code and the Codex CLI connect to Anthropic or OpenAI under the user's own account (their documentation lists the hosts to allow); with the user's own Anthropic API key, SSMS connects to https://api.anthropic.com.

Data at rest

Machine policy

SQL Sage reads two values under HKLM\SOFTWARE\Policies\LumaSoft\SqlSage, both REG_DWORD, when SSMS starts:

Details: machine policy for History. There is no machine policy for Mask names, Include results, the audit log, inline completions or the update check today: those are each user's settings in %LOCALAPPDATA%\SqlSage\settings.json.

31Licensing FAQ

How do I move SQL Sage to a new computer?

Install SQL Sage on the new computer and enter the same licence key with Enter license key. The key is not tied to a computer, so there is nothing to deactivate on the old one. The stored key is encrypted for your Windows account, so copying the %LOCALAPPDATA%\SqlSage folder to another computer does not bring it along. To remove SQL Sage from the old computer, uninstall it there and delete that folder.

I lost my licence key. How do I get it again?

Open the purchase page, enter the e-mail address you used at checkout and click Email me the key: we e-mail every key we hold for that address, except a revoked one. The page answers the same whether or not we hold a key for that address, and it accepts only a few requests at a time. You can also write to support@lumasoft.pl from that address, with your order number.

Can I get a refund?

Yes. A one-time (perpetual) purchase, and the first payment of a subscription, have a 14-day money-back guarantee; a subscription can be cancelled at any time and stays active until the end of the period you paid for. Write to support@lumasoft.pl with your order number or checkout e-mail, or use the receipt or customer portal from Paddle; Paddle, the Merchant of Record, returns the money. After a refund the licence is revoked: the AI features stop from your next AI request once SQL Sage's online check reports it (when it is checked), and the Free tools keep working. The full terms are in the Refund Policy.

Does SQL Sage work offline?

The Free tools need only your SQL Server, not the internet, and the trial is counted on this computer. A perpetual licence works offline with no end date. A subscription works offline through the date it is valid through; if its renewal cannot be confirmed online after that date, the AI features keep working for up to 14 more days, and the panel says until when. A licence check that cannot reach our server keeps your current licence state (when it is checked). The AI features themselves need Claude Code, the Codex CLI or Anthropic to be reachable.

What happens when the trial ends?

SQL Sage keeps working as SQL Sage Free: SQL Sage History, What's blocking now, Search, Find usages of column, the JOIN list, Check this database, F5 Guard and the editor commands stay, with your settings and history. The AI features and the Pro checks need a licence, and the panel shows a SQL Sage Free card with Enter license key and Buy SQL Sage. The 30-day trial starts with your first AI answer, or 14 days after you first open the panel, whichever comes first.

How many seats does a licence include?

Personal: 1 seat. Team 3: 3 seats. Team 10: 10 seats. One seat is one person, on all of their computers. That is the same for a one-time purchase and a subscription. SQL Sage has no per-computer activation and its licence check sends only the licence identifier, so keeping within the seats you bought is up to you, as section 4 of the Terms says.

32Privacy FAQ

What leaves my computer when I use an AI feature?

What the chip above the message box names for your next message — for example Schema + query → Claude in Agent mode or Query → Claude in Ask mode; the (i) next to it lists it in full. In short: your message, the attached query and, in Agent mode, schema metadata and what the AI's tools read from system catalogs and DMVs. Inline completions send up to 2,000 characters before the cursor and 600 after it; Explain error sends the error, the facts SQL Sage proved and the failing batch. Your connection's credentials and the local audit log are never sent. Details: What leaves this computer.

Do the Free tools send anything?

Nothing to an AI. SQL Sage Free makes no AI calls: SQL Sage History, What's blocking now, Search, Find usages of column, the JOIN list, Check this database, F5 Guard and the editor commands read your server with your query window's own sign-in and send nothing to Anthropic or OpenAI. SQL Sage's own requests to our servers — the update check, the signed model list and, for a paid licence, the licence check — carry no query, schema or results (Network endpoints).

Are my query results sent to the AI?

Not unless you turn on Include results under the privacy shield next to Send and agree to its prompt, where Cancel is the default. The consent is bound to the server, the database and the AI provider, and ends when any of them changes. Cell values you share are not masked. Without the consent, a query the AI wants to run on your tables is not run: the AI sees only its column names and types. Details: Include results.

What does Mask names hide?

With Mask names on (under the privacy shield; off by default), the server, every database on the server, logins, client machine names and file paths are replaced with placeholders such as <server> before anything is sent, and the real names stay on this computer. Table and column names are not masked, because the AI needs them to write your SQL. If SQL Sage cannot read the names it should replace, nothing is sent. Details: Mask names.

Are my history and the audit log sent anywhere, and are they encrypted?

Neither leaves this computer, and no AI tool can read your History. SQL Sage History, its recently closed tabs and your saved chats are encrypted with Windows DPAPI for your Windows account. The audit log is plain text, not encrypted. Since 0.35.4, passwords and other secret values are replaced with ? before an entry is written; entries written by 0.35.3 and earlier are not masked.

The full statement is the Privacy Policy.