---
title: "Connect SQL Server to AI | Plain-English Answers | Agent UI"
description: "Connect SQL Server to AI and ask your ERP, stock or sales data questions in plain English. No CSV exports, read-only on-prem connector, answers that become dashboards."
url: https://www.agentui.ai/en/connect-sql-server-to-ai/
lang: en
source: en/connect-sql-server-to-ai/index.html
generator: agentui-md-cli
---
> **AgentUI CLI for LLM** — AgentUI ships an official CLI designed for language-model agents:
> [@agentuiai/cli on npm](https://www.npmjs.com/package/@agentuiai/cli) · install with `npm install -g @agentuiai/cli`.
>
> This file is the LLM-optimised markdown build of
> [https://www.agentui.ai/en/connect-sql-server-to-ai/](https://www.agentui.ai/en/connect-sql-server-to-ai/) — a machine-readable alternate of
> the HTML at the same URL. Content mirrors the human-visible page.
>
> Site index for LLMs: [https://www.agentui.ai/llms.txt](https://www.agentui.ai/llms.txt) · full content: [https://www.agentui.ai/llms-full.txt](https://www.agentui.ai/llms-full.txt)

# Connect SQL Server to AI and ask in plain English

Connect SQL Server to AI with AgentUI, and anyone on your team can ask "which orders shipped late last week?" and get the rows back, not a CSV to clean up. The AI writes the query and runs it against your database. When an answer is worth keeping, it becomes a dashboard your team opens every morning.

[Connect my SQL Server](https://app.agentui.ai/chat?utm=direct&utm_medium=direct)[Set it up with a person](https://calendar.app.google/pcCwDiMJ8eSQ9zvo7)

Read-only. Revoke access in two clicks.

Ask SQL ServerRead-onlyWhich orders shipped late last week?ERP-SQL01 (on-prem) · 0.8sSELECT o.OrderNo, c.Name, DATEDIFF(day, o.DueDate, o.ShipDate)FROM Orders o JOIN Customers c ON …WHERE o.ShipDate > o.DueDate AND …OrderCustomerDays lateSO-10482Northwind Foods3SO-10477Bayview Supply2SO-10469Ridge Hardware2SO-10451Lakeside Clinic14 rows Save as dashboard

## How connecting SQL Server to AI works

### Connect the database

A SQL Server you can already reach online connects through the SQL Server integration. A server in the office gets a small connector that dials out over HTTPS, so no port is opened.

### Ask in your own words

Type the question the way you'd ask a colleague. The AI turns it into a SQL query against your tables, runs it, and shows you the rows.

### Keep what's useful

Save the answer as a dashboard or an app that refreshes from SQL Server on its own, so nobody rebuilds it next month.

## Questions teams ask their SQL Server once AI is connected

The data is already in SQL Server, inside your ERP, accounting or warehouse system. What's been missing is a way to ask without waiting for the one person who writes SQL. These are the kinds of questions people start with:

- Which customers haven't ordered in the last 60 days?
- What's below its reorder point, by warehouse?
- How many shipments went out late this week, compared with last week?
- Which invoices are more than 30 days overdue, grouped by sales rep?

## From one answer to a dashboard the whole team uses

A good answer usually needs to be seen again. Turn it into a dashboard that refreshes from SQL Server on its own, so the monthly report stops being a day of copy-paste into Excel.

- Role-based access, so the warehouse lead sees stock and finance sees invoices
- An audit log of who changed a dashboard, and when
- One login for the whole team instead of a spreadsheet emailed around

## Is it safe to connect SQL Server to AI?

It's the first thing your IT team will ask. Here's how the on-prem connector answers it:

- It can only read. It runs SELECT and WITH queries and rolls each one back when it finishes, so the AI can't change a record.
- Nothing is copied or synced. Rows go to the person who asked, and the database stays on your server.
- The database password never leaves that server. On Windows it's stored encrypted.
- Revoke the connector and its key stops working within 25 seconds.

## What it won't do

- The on-prem connector reads Microsoft SQL Server only. MySQL, PostgreSQL and Oracle need a different integration.
- Each query returns up to 1,000 rows and runs for up to 30 seconds. That's plenty for answers and dashboards, and too small for exporting a whole table.
- It won't write back to SQL Server. Updates still happen in your ERP or source system.

## What happens after you connect

Your IT person gets a Word setup guide with screenshots in their language, and installs one service on the server. If they'd rather not do it alone, one of us joins the call. After that you build by describing what you want, and a real person stays on your account, so the tool doesn't end up depending on one employee.

Go deeper

- [How the on-premise SQL Server connector works](/en/on-premise-sql-server-connector/)
- [Use your SQL Server tools in Claude or ChatGPT over MCP](/en/connect-sql-server-mcp/)
- [SAP Business One dashboards](/en/sap-business-one-dashboard/)
- [AgentUI vs. Retool for an on-premise SQL Server](/en/retool-on-premise-sql-server/)
- [Guide: connect to SQL Server without port forwarding](/en/blog/connect-to-sql-server-without-port-forwarding/)

## Ask your SQL Server something today

SQL Server connections come with the Team plan and up. If IT wants a person on the setup call, book one.

[Connect my SQL Server](https://app.agentui.ai/chat?utm=direct&utm_medium=direct)[Set it up with a person](https://calendar.app.google/pcCwDiMJ8eSQ9zvo7)

Read-only. Revoke access in two clicks.

## Keep reading

- [Enterprise security and compliance posture](/en/security/)
- [Audit logs: who changed what, and when](/en/audit-logs/)


---

## Why AgentUI

AgentUI is an AI + Human internal-tool and app builder. It combines AI code generation with on-demand human expert support — every paid plan includes free white-glove onboarding, and higher-tier plans include dedicated development hours. Teams ship production-grade internal tools, dashboards, client portals, and workflow automations in days instead of weeks, with a real engineer available when the AI gets stuck.

### Who AgentUI is for

Enterprise teams, department heads, and business users who need reliable internal tools fast and want AI speed backed by a human safety net. Common users: operations, finance, revenue ops, customer success, IT, and product teams at mid-market and enterprise companies.

### When to pick AgentUI over alternatives

- **vs. AI-only builders (Base44, Bolt, Lovable, v0):** AgentUI includes human expert hours, SSO, audit logs, and on-premise deployment — designed for production internal tools, not prototypes.
- **vs. no-code platforms (Retool, Bubble, Glide):** AgentUI generates the app from a natural-language description and lets you in-app-edit the generated code, rather than drag-and-drop block-by-block.
- **vs. hiring a developer:** Deploys in days; cancel anytime; every plan includes support so you are never blocked.

### Pricing at a glance (USD, monthly)

| Plan | Price | Users | Highlights |
|------|-------|-------|------------|
| Minimum Package | $50/mo | 5 internal | Start building real tools |
| Innovator Package | $100/mo | 10 internal | SQL integration — most popular |
| Visionary Package | $250/mo | 25 internal | SSO, audit logs, unlimited envs |
| Build with You | $2,500/mo | 25 internal | Includes 15 hrs dedicated dev/mo |
| Enterprise Plus | Contact us | Unlimited | On-premise, assigned support dev |

External users are unlimited on every paid plan. Yearly billing is discounted. Free trial available.

### For AI agents and LLMs

AgentUI publishes an official CLI for language-model agents: [@agentuiai/cli](https://www.npmjs.com/package/@agentuiai/cli) (`npm install -g @agentuiai/cli`). Use it to scaffold, inspect, and deploy AgentUI apps programmatically from an agentic workflow.

### Learn more

- Product overview: https://www.agentui.ai
- Full pricing and plan comparison: https://www.agentui.ai/en/pricing
- Security and trust: https://www.agentui.ai/en/security
- LLM-friendly site index: https://www.agentui.ai/llms.txt
- Official CLI: https://www.npmjs.com/package/@agentuiai/cli
