IRIntellrise
How-to

How to connect SQL Server to an AI data analyst

Updated 2026-07-01

An AI data analyst is most useful when it runs on your real data. This guide shows how to connect SQL Server so you can ask questions in plain English and get charts, dashboards and reports back — without writing SQL by hand.

The setup takes a few minutes: connect with a read-only user, let the analyst read the schema, and ask your first question. Your credentials are encrypted, and the analysis runs on your own AI provider key.

  1. 1

    Get your SQL Server connection details

    You need the server host, port (usually 1433), database name, and a SQL login with a username and password. For Azure SQL, copy the server name and enable encryption.

  2. 2

    Create a read-only user (recommended)

    Add the login to the db_datareader role on the target database. That grants read access to every table without any write permission.

  3. 3

    Create your account and add your AI key

    Sign up, then add your own AI provider key (bring-your-own-key). If you don't have one yet, a free key takes about a minute to create — your key is encrypted and used only for your requests.

  4. 4

    Add the SQL Server connection

    Add a data source, choose SQL Server, and enter server, port, database, user and password. Turn on encryption if your server requires it, then test and save.

  5. 5

    Let the AI read and annotate your schema

    The analyst reads your tables, views and columns and describes what they mean. With dbt, point it at your target schema so it uses your modelled definitions.

  6. 6

    Ask your first question in plain English

    Ask something like "Sales by region this quarter vs last". On complex questions the analyst shows a readable query plan before it runs anything; review it, then get a chart plus the data behind it. Refine by chatting, then pin it to a dashboard or save it as a report.

Why connect SQL Server instead of exporting

A static export goes stale the moment you download it, and a general AI assistant that only sees a pasted file guesses what your columns mean. A connected AI data analyst reads live SQL Server data, shows the query plan before running it, and remembers what your fields mean between sessions — so answers stay current and consistent.

SQL Server: things to know

  • Azure SQL usually requires encryption — enable it if the connection is refused.
  • If you use schemas beyond dbo, make sure the read-only login can see them.

Example questions to ask your SQL Server data

  • Sales by region this quarter vs last
  • Average order value by customer segment
  • Open support tickets by priority

Keeping it safe

  • Connect with a read-only user so the analyst can never change your data.
  • A read-only SQL guard blocks anything that isn't a read query.
  • Connection details and your AI key are encrypted at rest.
  • Your business data isn't stored or used to train any model.

Frequently asked questions

Yes. Use the Azure server name, enable encryption, and connect with a SQL login that has db_datareader.

Related

Get your end-to-end AI business intelligence now.

Conversational analytics with AI that understands your data — no SQL, no data team required.