# Sqlsim

> Sqlsim is an open-source agent skill for databases. Lets an agent run SQL queries and multi-threaded load tests against SQL Server and Azure. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/microsoft/sqlsimtools/tree/main/.github/skills/sqlsim
- **Repository:** https://github.com/microsoft/sqlsimtools
- **GitHub stars:** 50
- **License:** MIT
- **Skill name:** sqlsim
- **Collection:** https://github.com/microsoft/sqlsimtools
- **Categories:** [databases](https://ai-powered.com/categories/databases), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill teaches an agent to drive the sqlsim command-line tool, which executes T-SQL ad-hoc or from a .sql file against SQL Server, Azure SQL Database, Azure SQL Managed Instance and SQL databases in Microsoft Fabric. It covers the command syntax, the authentication modes (integrated, Entra, managed identity, service principal, access token and SQL login), and how to pick the right one per platform.

The guidance walks the agent through locating the executable, either in a workspace release overlay or on PATH, and stops with a clear message if neither is present. It sets out rules for safe invocation, such as capturing output into variables rather than redirecting it, parsing JSON results and computing deltas between phases, and scaling thread counts gradually while watching client resources. It also explains certificate validation behaviour and how to poll live query statistics during a run.

The skill expects the sqlsim binary to be installed separately from the release downloads; it does not ship the executable itself. Workloads are written as SQL files with GO batch separators and typically wrapped in a PowerShell script, and results can be emitted as JSON or NDJSON for automation.

## When your agent uses it

> Run SQL queries, scripts, or multi-threaded workloads against SQL Server, Azure SQL Database, Azure SQL Managed Instance, or SQL database in Microsoft Fabric using the sqlsim CLI. USE FOR — executing T-SQL ad-hoc or from a `.sql` file; stress / load testing with N threads × R iterations; measuring connection / login / fetch timings; producing JSON metrics for automation; capturing per-query statistics (`-querystats`). DO NOT USE FOR — non-SQL Server engines (MySQL, Postgres, Oracle), or schema generation / data loading (sqlsim runs queries; it does not generate schemas).

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/microsoft/sqlsimtools/tree/HEAD/.github/skills/sqlsim)
- [License: MIT](https://github.com/microsoft/sqlsimtools/tree/HEAD/.github/skills/sqlsim)

## Features

- **Ad-hoc and file query execution:** Runs a single T-SQL query or a .sql script file against a target database.
- **Multi-threaded load testing:** Runs a workload across N threads for R iterations to simulate concurrent load.
- **Authentication mode guidance:** Explains which sqlsim auth flag to use for Windows, Entra, managed identity, service principal and tokens.
- **JSON and live metrics output:** Produces final JSON results, NDJSON progress streams and periodic query statistics snapshots.
- **Certificate and safety rules:** Documents TLS certificate validation behaviour and guidance on scaling load safely.

## Good for

- Run a T-SQL script against a local SQL Server instance
- Stress test an Azure SQL database with 10 threads for 100 iterations
- Measure connection and login timings against a SQL server
- Export workload results as JSON for a CI pipeline
- Capture per-query statistics during a load test

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/sqlsim` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/sqlsim &&
cp -R "$tmp/.github/skills/sqlsim" ~/.claude/skills/sqlsim &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/sqlsim` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/sqlsim` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/sqlsim &&
cp -R "$tmp/.github/skills/sqlsim" ~/.agents/skills/sqlsim &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/sqlsim` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/sqlsim` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/sqlsim &&
cp -R "$tmp/.github/skills/sqlsim" ~/.cursor/skills/sqlsim &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/sqlsim` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/microsoft/sqlsimtools.git --path .github/skills/sqlsim
```

Or copy the folder to `~/.gemini/skills/sqlsim` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/sqlsim`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/sqlsim &&
cp -R "$tmp/.github/skills/sqlsim" ~/.copilot/skills/sqlsim &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/sqlsim` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/microsoft/sqlsimtools.git
```

Then copy `sqlsimtools/.github/skills/sqlsim` into your agent's skills folder as `sqlsim`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What do I need installed before Sqlsim works?

The sqlsim executable must be installed from a release, either in the workspace release overlay or on PATH. The plugin supplies guidance only, not the binary.

### Does Sqlsim create schemas or load data?

No. It runs queries and workloads; it does not generate schemas or load data.

### Which database engines does Sqlsim support?

SQL Server, Azure SQL Database, Azure SQL Managed Instance and SQL databases in Microsoft Fabric. Non-SQL Server engines such as MySQL, Postgres and Oracle are out of scope.

### How are secrets handled for Azure runs?

The guidance recommends passing access tokens or passwords through redirected stdin using -T - or -P - so secrets stay out of process arguments.

### How do I install Sqlsim in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/sqlsim to use it in all your projects, or to .claude/skills/sqlsim in one project.

### Does Sqlsim run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Sqlsim?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Sqlsim?

The closest alternatives to Sqlsim are Sqlsimstudio, Sqlpysim, Sqlsimtools build, Sqlsimstudio load test and Sqlsimstudio manual test.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Sqlsimstudio](https://ai-powered.com/skills/sqlsimstudio): Sqlsimstudio is an open-source agent skill for developer tools.
- [Sqlpysim](https://ai-powered.com/skills/sqlpysim): Sqlpysim is an open-source agent skill for databases.
- [Sqlsimtools build](https://ai-powered.com/skills/sqlsimtools-build): Sqlsimtools build is an open-source agent skill for developer tools.
- [Sqlsimstudio load test](https://ai-powered.com/skills/sqlsimstudio-load-test): Sqlsimstudio load test is an open-source agent skill for developer tools.
- [Sqlsimstudio manual test](https://ai-powered.com/skills/sqlsimstudio-manual-test): Sqlsimstudio manual test is an open-source agent skill for developer tools.
- [Sqlsimtools release](https://ai-powered.com/skills/sqlsimtools-release): Sqlsimtools release is an open-source agent skill for developer tools.
- [Azure resource manager SQL dotnet](https://ai-powered.com/skills/azure-resource-manager-sql-dotnet): Azure resource manager SQL dotnet is an open-source agent skill for databases.
- [Go database](https://ai-powered.com/skills/go-database): Go database is an open-source agent skill for databases.

---
Source: https://ai-powered.com/skills/sqlsim
