---
title: "SQL ServerをAIに接続 | 普段の言葉で質問 | Agent UI"
description: "SQL ServerをAIに接続して、ERP・在庫・売上のデータに普段の言葉で質問。CSVの書き出しは不要。読み取り専用のオンプレミスコネクタで、答えはそのままダッシュボードになります。"
url: https://www.agentui.ai/ja/connect-sql-server-to-ai/
lang: ja
source: ja/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/ja/connect-sql-server-to-ai/](https://www.agentui.ai/ja/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)

# SQL ServerをAIに接続して、普段の言葉で質問しよう

SQL ServerをAIに接続すれば、AgentUIでチームの誰もが「先週、出荷が遅れた注文は？」と聞くだけで、結果の行がそのまま返ってきます。整形が必要なCSVではありません。クエリはAIが書いて、データベースに対して実行します。残しておきたい答えは、チームが毎朝開くダッシュボードにできます。

[SQL Serverをつなぐ](https://app.agentui.ai/chat?utm=direct&utm_medium=direct)[担当者と一緒に設定する](https://calendar.app.google/pcCwDiMJ8eSQ9zvo7)

読み取り専用。2クリックで取り消せます。

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

## SQL ServerをAIに接続するしくみ

### データベースをつなぐ

すでにオンラインでアクセスできるSQL Serverは、SQL Server連携でつながります。社内のサーバーには小さなコネクタを入れ、外向きのHTTPSで接続するので、ポートを開ける必要はありません。

### 自分の言葉で聞く

同僚に聞くのと同じように質問を入力してください。AIがテーブルに対するSQLクエリに変換して実行し、結果の行を表示します。

### 役立つものは残す

答えは、SQL Serverから自動で更新されるダッシュボードやアプリとして保存できます。翌月に誰かが作り直す必要はありません。

## AIを接続したあと、チームがSQL Serverに聞いていること

データはすでにSQL Serverの中、ERPや会計、倉庫のシステムにあります。足りなかったのは、SQLを書ける一人を待たずに質問する方法です。最初はたとえばこんな質問から始まります。

- 直近60日間、注文のない顧客は？
- 発注点を下回っている品目を倉庫別に見せて
- 今週遅れて出荷した件数は？先週と比べてどう？
- 支払期日を30日以上過ぎた請求書を、営業担当者別にまとめて

## ひとつの答えを、チーム全員が使うダッシュボードに

良い答えは、たいていまた見たくなるものです。SQL Serverから自動で更新されるダッシュボードにすれば、月次レポートのためにExcelへコピー＆ペーストする一日がなくなります。

- ロールベースのアクセス制御で、倉庫リーダーには在庫を、経理には請求書を
- 誰がいつダッシュボードを変更したかを記録する監査ログ
- メールで回すスプレッドシートではなく、チーム全員がひとつのログインで

## SQL ServerをAIに接続しても安全？

IT部門が最初に聞くのはこの点です。オンプレミスコネクタの答えはこうです。

- できるのは読み取りだけ。SELECTとWITHのクエリを実行し、終わるたびにロールバックするので、AIがレコードを変更することはできません。
- コピーも同期もしません。結果の行は質問した人に届き、データベースはお客様のサーバーに残ります。
- DBのパスワードはそのサーバーから出ることはありません。Windowsでは暗号化して保存されます。
- コネクタを取り消せば、キーは25秒以内に使えなくなります。

## できないこと

- オンプレミスコネクタが読み取れるのはMicrosoft SQL Serverだけです。MySQL・PostgreSQL・Oracleには別の連携が必要です。
- 1回のクエリで返せるのは最大1,000行、実行時間は最大30秒です。答えやダッシュボードには十分ですが、テーブルを丸ごと書き出すには足りません。
- SQL Serverへの書き戻しはしません。更新は引き続きERPや元のシステムで行います。

## 接続したあとの流れ

IT担当者には、スクリーンショット付きのWord版設定ガイドを担当者の言語でお渡しします。作業はサーバーにサービスを1つ入れるだけ。ひとりで進めるのが不安なら、当社のスタッフが通話で付き添います。そのあとは作りたいものを説明するだけで構築でき、実際の担当者がアカウントに付き続けるので、ツールが特定の社員ひとりに頼りきりになることはありません。

さらに詳しく

- [オンプレミスSQL Serverコネクタのしくみ](/ja/on-premise-sql-server-connector/)
- [MCPでSQL ServerのツールをClaudeやChatGPTから使う](/ja/connect-sql-server-mcp/)
- [SAP Business One のダッシュボード](/ja/sap-business-one-dashboard/)
- [オンプレミスSQL Serverで比べるAgentUIとRetool](/ja/retool-on-premise-sql-server/)
- [ガイド：ポートフォワーディングなしでSQL Serverに接続する方法](/ja/blog/connect-to-sql-server-without-port-forwarding/)

## 今日、SQL Serverに質問してみよう

SQL Serverとの接続はTeamプラン以上で利用できます。設定の通話に担当者の同席をご希望なら、予約してください。

[SQL Serverをつなぐ](https://app.agentui.ai/chat?utm=direct&utm_medium=direct)[担当者と一緒に設定する](https://calendar.app.google/pcCwDiMJ8eSQ9zvo7)

読み取り専用。2クリックで取り消せます。

## あわせて読む

- [エンタープライズのセキュリティとコンプライアンス体制](/ja/security/)
- [監査ログ：誰が、何を、いつ変更したか](/ja/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
