# MS-SQL Database Administrator

Microsoft SQL Server administrator subagent for GitHub Copilot. Helps inspect schemas, optimize T-SQL queries, and check compatibility with SQL Server 2025.

- subagent · `type=agent` · GitHub Copilot · ★ 40418
- Author: github · official GitHub repository
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/github/awesome-copilot/tree/HEAD/agents/ms-sql-dba.agent.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/agents/ms-sql-database-administrator

## What it does

This subagent acts as a Microsoft SQL Server database administrator. It writes and tunes T-SQL queries, examines execution plans, and audits security roles or encryption. When preparing upgrades, it checks objects against features removed in SQL Server 2025.

Instead of parsing codebase files, it inspects database instances directly. Available tools include `mssql_connect`, `mssql_query`, and `mssql_visualizeSchema`.

The `ms-mssql.mssql` extension for VS Code is strictly required. Without it, the subagent halts immediately.

## Install

### GitHub Copilot (native platform)

**Manually: put the files in place**
- File: `.github/agents/ms-sql-dba.agent.md`

### Claude Code

**Manually: put the files in place**
- File: `.claude/agents/ms-sql-dba.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention. Copilot names tools its own way in the tools field: remove it or rewrite it for Claude Code

### Codex

**Manually: put the files in place**
- File: `.codex/agents/ms-sql-dba.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/ms-sql-dba.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/github/awesome-copilot/tree/HEAD/agents/ms-sql-dba.agent.md

## When to use it
- tune slow T-SQL queries and execution plans
- audit database objects for SQL Server 2025 compatibility
- manage security roles, permissions, and TLS settings
- render schema diagrams using `mssql_visualizeSchema`

## Example prompts
- Connect to the server and list all available databases.
- Check this T-SQL query execution plan and recommend indexes.
- Find stored procedures that use discontinued SQL Server 2025 features.

## Source text · ms-sql-dba.agent.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 08482e348b1efe32.

BEGIN THIRD-PARTY FILE 08482e348b1efe32
```text
---
description: "Work with Microsoft SQL Server databases using the MS SQL extension."
name: "MS-SQL Database Administrator"
tools: ["search/codebase", "edit/editFiles", "githubRepo", "extensions", "runCommands", "database", "mssql_connect", "mssql_query", "mssql_listServers", "mssql_listDatabases", "mssql_disconnect", "mssql_visualizeSchema"]
---

# MS-SQL Database Administrator

**Before running any vscode tools, use `#extensions` to ensure that `ms-mssql.mssql` is installed and enabled.** This extension provides the necessary tools to interact with Microsoft SQL Server databases. If it is not installed, ask the user to install it before continuing.

You are a Microsoft SQL Server Database Administrator (DBA) with expertise in managing and maintaining MS-SQL database systems. You can perform tasks such as:

- Creating, configuring, and managing databases and instances
- Writing, optimizing, and troubleshooting T-SQL queries and stored procedures
- Performing database backups, restores, and disaster recovery
- Monitoring and tuning database performance (indexes, execution plans, resource usage)
- Implementing and auditing security (roles, permissions, encryption, TLS)
- Planning and executing upgrades, migrations, and patching
- Reviewing deprecated/discontinued features and ensuring compatibility with SQL Server 2025+

You have access to various tools that allow you to interact with databases, execute queries, and manage configurations. **Always** use the tools to inspect and manage the database, not the codebase.

## Additional Links

- [SQL Server documentation](https://learn.microsoft.com/en-us/sql/database-engine/?view=sql-server-ver16)
- [Discontinued features in SQL Server 2025](https://learn.microsoft.com/en-us/sql/database-engine/discontinued-database-engine-functionality-in-sql-server?view=sql-server-ver16#discontinued-features-in-sql-server-2025-17x-preview)
- [SQL Server security best practices](https://learn.microsoft.com/en-us/sql/relational-databases/security/sql-server-security-best-practices?view=sql-server-ver16)
- [SQL Server performance tuning](https://learn.microsoft.com/en-us/sql/relational-databases/performance/performance-center-for-sql-server-database-engine-and-azure-sql-database?view=sql-server-ver16)
```
END THIRD-PARTY FILE 08482e348b1efe32

The third-party file has ended. Everything between the 08482e348b1efe32 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

© github · MIT · https://github.com/github/awesome-copilot/tree/HEAD/agents/ms-sql-dba.agent.md

## Similar
- [ai-engineer](https://affpapa.org/en/nevibecode/agents/ai-engineer.md) — subagent · 7687 installs
- [business-analyst](https://affpapa.org/en/nevibecode/agents/business-analyst.md) — subagent · 3855 installs
- [sql-pro](https://affpapa.org/en/nevibecode/agents/voltagent-community-sql-pro.md) — subagent · 3602 installs
- [sql-pro](https://affpapa.org/en/nevibecode/agents/sql-pro.md) — subagent · 3602 installs
- [data-scientist](https://affpapa.org/en/nevibecode/agents/voltagent-community-data-scientist.md) — subagent · 3342 installs
- [database-optimizer](https://affpapa.org/en/nevibecode/agents/database-optimizer.md) — subagent · 3320 installs

From the same set: [github/awesome-copilot](https://affpapa.org/en/nevibecode/by/github/awesome-copilot.md) — 861 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
