MS-SQL Database Administrator — GitHub Copilot subagent
Microsoft SQL Server administrator subagent for GitHub Copilot. Helps inspect schemas, optimize T-SQL queries, and check compatibility with SQL Server 2025.
.github/agents/ms-sql-dba.agent.mdWhat MS-SQL Database Administrator 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.
What it helps with
- 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 for the agent
- 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.
How to install MS-SQL Database Administrator
Manually: put the files in place
.github/agents/ms-sql-dba.agent.mdManually: put the files in place
.claude/agents/ms-sql-dba.mdFor 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
Manually: put the files in place
.codex/agents/ms-sql-dba.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/ms-sql-dba.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about MS-SQL Database Administrator
How to install MS-SQL Database Administrator in GitHub Copilot?
Place the subagent configuration file into .github/agents/ms-sql-dba.agent.md inside your repository.
What does MS-SQL Database Administrator do?
It manages Microsoft SQL Server instances by executing queries, tuning performance, auditing permissions, and checking migration compatibility.
What dependencies are required to run this subagent?
You need the ms-mssql.mssql extension installed and active in VS Code. The subagent verifies this with #extensions before running queries.
Source text
ms-sql-dba.agent.md · MIT
--- 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)
© github · MIT · github/awesome-copilot