SQL Server extension
On this page
The SQL Server extension connects Strata to a Microsoft SQL Server database — on-prem, hosted, or Azure SQL — so the AI can run live queries against your schema, generate charts and Excel exports from real results, and power the database pages in the sidebar.
Without a connection, a chat has no database tools at all: the AI never looks for tables, and it brings up databases only when you ask about your own organization's records.
#Add your first connection
- Open Settings, then click the Extensions tab. Find the Microsoft SQL Server tile and click it.
- On the extension detail page, click + Add connection.
- In the New Connection form, fill in:
- Connection name — a short label like
Production DB. Names are unique per user; an inline availability check shows Name is available or You already have a connection with that name as you type. - Reach the server through — shown when your organization has a private connector: A public hostname (direct), or one of its private connectors for a server inside your network. Choosing a connector fills in Server and Port and locks them, and the line under the choice says where the connector reaches; its agent must read Connected in Organization then Database connections before Strata can connect through it. A connector that is not ready yet says so.
- Server — the hostname, e.g.
myserver.database.windows.net. - Database — the database name, e.g.
AdventureWorks. - Port — defaults to
1433. - Username and Password — SQL authentication credentials. Use the eye icon next to Password to reveal what you typed.
- Trust server certificate — checked by default; uncheck if your server uses a CA-signed certificate that Strata should validate.
- Connection name — a short label like
- Click Save & activate. The button cycles through Saving credentials… and Connecting to server… as Strata persists the credentials and opens a connection pool, then finishes once the live connection is confirmed. Stored procedures are indexed in the background — the connection is usable immediately, so you don't wait on a procedure-heavy database.
When the form closes you land back on the extension page with your new connection marked Active. The sidebar now shows a Data group with the database pages: Tables, Procedures, Explorer, Schema map, and Metrics.
NoteIf activation fails (wrong password, blocked port, TLS mismatch), Strata rolls back the just-saved connection so a failed attempt never leaves an orphan you'd have to clean up — fix the details and click Save & activate again.
#How credentials are stored
Passwords are encrypted at rest with AES-256-GCM using a platform-managed key (DB_ENCRYPTION_KEY). The plaintext password is never written to the platform database and never returned by any API. Strata holds connection pools in memory only; pools are closed after 30 minutes of idle time and re-opened on the next query.
Strata also enforces an SSRF guard on every save and activate: hostnames that resolve to loopback, link-local, private RFC1918, carrier-grade NAT, multicast, or cloud-metadata addresses (169.254.169.254, 169.254.170.2) are rejected with Connections to private/internal addresses are not allowed. Use a public endpoint or a properly configured firewall pinhole, or ask your admin about a private connector.
#Managing multiple connections
The Saved connections block on the SQL Server detail page lists every connection you've saved, with a dot to the left of the active one. Click any row to open its detail view.
On a connection's detail page you can:
- Activate — switch the active connection to this one; the page header offers it beside Manage, or says Currently active for the connection in use. The previous connection's pool is left open and idle (it gets cleaned up after 30 minutes); the database pages refresh against the new connection.
- Rename — click the name in the page header to edit it inline. Press Enter to save, Esc to cancel.
- Edit the description — type into the description textarea; it auto-saves when you click out of the field.
- Copy the server, database, username or the connection's ID with the button beside each.
- Remove connection — in the header's Manage menu. You're asked to type the connection name to confirm. Deleting removes Strata's saved credentials only; the underlying database is untouched. Past chats that referenced the connection keep their history but lose live access.
If you have Org connections (databases your admin provisioned for the whole organization), they appear in the same list with an Added by your org pill. You can activate them and view their details (their page has no Manage menu), but you can't rename, edit, or delete them — see /docs/integrations/sql-server/org-connections.
#Disconnecting
Use Disconnect in the SQL Server tile header to clear the active connection without deleting it. The connection pool closes immediately and the database pages disappear from the sidebar. Your saved credentials remain — click any connection in Saved connections to activate it again later.
#What gets unlocked
With at least one SQL Server connection active, a Data group appears in the sidebar with these pages:
- Tables — every table with its schema, row count and when it last changed. Filter by schema, search, or sort by name, schema or row count, and open a table to see its columns, foreign keys and indexes.
- Procedures — the stored procedures, grouped by schema, with a search and a schema filter. Open one to see its parameters, what it depends on and its definition. To enable or disable individual procedures in Strata's routing, use the Procedures tab of the SQL Server extension (Settings > Apps > Microsoft SQL Server), which appears once a database is connected.
- Explorer — the rows of any table, a page at a time, which you can sort, search and filter.
- Schema map — each schema is a region with its name on it, and inside it the tables sit beside the tables their keys join. The map opens at a size you can read: the whole map when it fits, otherwise the busiest schema, with Fit for the rest (far out, tables become blocks and the schema names stay readable).
- Moving around: scroll or drag to move the map, and pinch or hold Ctrl (⌘ on a Mac) while scrolling to zoom at the pointer. The hint at the bottom of the map names the key your keyboard uses, and if you scroll up or down without it, a short reminder says Hold ⌘ and scroll to zoom (Ctrl on Windows), at most a few times and never again once you have zoomed. On a phone, drag with one finger and pinch with two. The minimap shows where you are; press it to go there.
- Search finds tables by name, and tables that have a column by that name. Pick a result (or press Enter) to go to that table and open it; the other tables step back while you search.
- A table you open draws its keys with the columns they join and lights the tables it joins. Its panel lists its columns (keys marked, each foreign key with the table it points to), what it references and what references it (each one opens that table), its indexes, and a query to copy. On a phone the panel rises from the bottom. Opening a table the panel would cover moves the map just far enough to show it: sideways on a computer, up on a phone. Its panel also has Move on the map, whose arrows move the table a step at a time, as dragging it or pressing Alt and an arrow key does.
- Names: point at a table whose name is cut off to see the whole name; far out, where the tables are blocks, pointing at one shows its schema and name.
- Keyboard:
/searches,+and-zoom,0fits, the arrow keys move the map, and Escape closes the panel.
- Metrics — the metrics your organization certified for this database (see Certified metrics), one card each: its name and what it is, its unit, who owns it and its other names, its inputs (each with its type, whether it is required and its default), the columns it returns, when it was last checked, and the badge Certified metric · version 3, approved Nov 15, 2026. The search narrows the cards by name, other name, description, unit or owner.
- Ask about this opens a new chat with Show me Net revenue typed in its box, and sends nothing: send it as it is, or add to it first (… for October, by region). Strata then runs the metric as certified, with your access.
- You see exactly the metrics you could ask Strata to run: those of the approved version that are certified as they are now, on one of your organization's shared databases that you may use. A metric switched on but not tested, edited since its test, failing its nightly check, or only in a draft is not listed, and nor is any other kind of business definition.
- Show SQL shows the metric's SQL, exactly as it was approved: the same SQL a chat shows once the metric runs. People who manage the organization's database connections also get Open Business definitions, where metrics are edited and certified.
- With none certified yet the page says so (No certified metrics on Finance DW yet) and how certifying works. On a database you connected yourself it says Certified metrics belong to your organization's databases, since only shared databases have business definitions.
- In the iPhone app, Metrics is on the SQL Server page (Settings › Extensions › Microsoft SQL Server) while a database is connected: the same metrics, each with its inputs, Show SQL and Ask about this.
These pages share the layout of the rest of Strata: the page title with a line saying what the page is for, then its filters and search. On a phone, Procedures shows its list above the procedure and Explorer shows its tables above the rows.
The AI now has the run_sql tool available. Ask any question about your data — "show me the 10 largest tables", "what's the trend in monthly orders by region", "build me a dashboard of last quarter's revenue" — and the AI plans the SQL, executes it, and renders results as tables, charts, Excel exports, or full dashboards depending on what you asked for.
#Permissions and write queries
Whether the AI can write to your database is controlled by your SQL permission tier:
- Viewer (default) — read-only.
INSERT,UPDATE,DELETE, and DDL statements are blocked. - Editor — writes are allowed with a per-query confirmation card.
- Admin — full DDL access.
Your admin sets the default tier per role under Organization then Roles. For org-managed connections, the tier is your role's default — or, where your organization counts group roles, a higher level from a role bound to one of your groups — unless an admin sets one for you on that specific connection, and a chat, on the web or in Microsoft Teams, never goes above your account's SQL permission setting. On your own personal connections the tier comes from your account's SQL permission setting (it starts at your organization's default database access; your admin can lock it). See /docs/admin/roles for the tier definitions.
#What can go wrong
You already have a connection with that name.— connection names are unique per user (case-insensitive). Pick a different name, or rename / delete the conflicting connection first.Connections to private/internal addresses are not allowed.— the server you entered resolves to a private or loopback IP. The SSRF guard blocks these for safety. Use a public hostname or have your network team expose the database on a routable address, or ask your admin about a private connector.Could not activate connection — check server, port, and credentials.— the credentials saved but the connection probe failed. Most often this is a wrong password, a firewall blocking port 1433, or a TLS trust mismatch (try toggling Trust server certificate).SQL Server access is disabled by your organization administrator.— thesql_serverextension has been removed from your org's allowed extensions. Contact your admin.Session invalid — please log out and log back inon a connection action — your auth session has lost its user ID. Sign out and sign back in, then retry.- Database pages don't appear in the sidebar — no connection is currently active. Open Settings > Apps > Microsoft SQL Server and activate one of your saved connections.
- Schema cache feels stale after a database change — Strata invalidates the cache automatically on connection edit and delete. To force a fresh scan of your stored procedures specifically, open the Procedures tab of the SQL Server extension (Settings > Apps > Microsoft SQL Server) and click the refresh icon next to the section header.
#Related
- /docs/integrations/sql-server/org-connections — admin-managed connections shared across the org.
- /docs/admin/roles — Viewer / Editor / Admin SQL tiers.
- /docs/chat — asking natural-language questions about your data.