dbatools: Command for GitHub Copilot

.github/prompts/sql-version-support.md

sql-version-support is a command for GitHub Copilot from dataplat/dbatools. It costs 0 tokens per session (1,707 once invoked), scanned A, original, MIT.

A guide for deciding how much support to provide for different Microsoft SQL Server versions, including SQL Server 2000 through 2025. It explains when older-version support is practical and when newer features are required.

In plain words
What is it for?
Use it when adding or reviewing SQL Server features that must work across several server versions.
Why use it?
It helps prevent accidental loss of support for legacy database systems while avoiding unnecessarily complex code.

Command for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt.

This is dataplat/dbatools's own configuration. It tells GitHub Copilot how to work on dbatools itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything dbatools configures →

About the project

dbatools is a PowerShell toolkit for automating SQL Server administration and moving SQL Server instances between environments. It is for database administrators who manage SQL Server systems and migrations.

dataplat/dbatools · 2,858 stars · on GitHub · dbatools.io

Reuse

Borrowing it

Nothing to install: this file belongs to dataplat/dbatools. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dataplat/dbatools/development/.github/prompts/sql-version-support.md
Clone the repo
git clone --depth 1 https://github.com/dataplat/dbatools

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for sql-version-support

README.md
[![agentmods](https://agentmods.dev/badge/commands/dataplat/dbatools/sql-version-support/github.svg)](https://agentmods.dev/commands/dataplat/dbatools/sql-version-support)
Your own site
<a href="https://agentmods.dev/commands/dataplat/dbatools/sql-version-support"><img src="https://agentmods.dev/badge/commands/dataplat/dbatools/sql-version-support/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sql-version-support

Your own site · 80×15
<a href="https://agentmods.dev/commands/dataplat/dbatools/sql-version-support"><img src="https://agentmods.dev/badge/commands/dataplat/dbatools/sql-version-support.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,707 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.01707
Opus 5.5 $0.00000 $0.00683
Sonnet 5.5 $0.00000 $0.00341
Haiku 4.5 $0.00000 $0.00171

Measured 6d ago against content hash 6b58253fa6f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

sql-version-support scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/prompts/sql-version-support.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SQL Server Version Support Guide

GUIDING PRINCIPLE: SQL Server 2008 is the oldest version dbatools supports. Connect-DbaInstance refuses anything older, because SMO 181 - which dbatools.library ships since 2026.5.3 and dbatools requires since 2.8.3 - no longer supports it. dbatools 2.8.2 with dbatools.library 2025.12.28 is the last release that supports SQL Server 2000 and 2005 (#10812).

Version Number Mapping

SQL Server Version VersionMajor Check Example
SQL Server 2000 8 Refused by Connect-DbaInstance
SQL Server 2005 9 Refused by Connect-DbaInstance
SQL Server 2008/2008 R2 10 $server.VersionMajor -eq 10
SQL Server 2012 11 $server.VersionMajor -eq 11
SQL Server 2014 12 $server.VersionMajor -eq 12
SQL Server 2016 13 $server.VersionMajor -eq 13
SQL Server 2017 14 $server.VersionMajor -eq 14
SQL Server 2019 15 $server.VersionMajor -eq 15
SQL Server 2022 16 $server.VersionMajor -eq 16
SQL Server 2025 17 $server.VersionMajor -eq 17

Philosophy

  • Support SQL Server 2008 and later. Every connection goes through Connect-DbaInstance, which refuses older instances with a message that names the last release supporting them, so no command needs its own check for SQL Server 2000 or 2005.
  • Do not add new SQL Server 2000 or 2005 code paths. The existing -eq 8 and -eq 9 branches are unreachable now. Remove them when you change the code around them anyway.
  • Skip gracefully when a feature needs a version newer than 2008.
  • Never be dismissive or judgmental about users running old SQL Server versions
  • Respect that users may be dealing with legacy systems beyond their control
  • Balance maintenance and support - practical, not ideological

Three Patterns for Version Handling

1. MinimumVersion Parameter (Most Common for Features Newer than SQL 2008)

# Requires SQL Server 2012 or higher
$server = Connect-DbaInstance -SqlInstance $instance -SqlCredential $SqlCredential -MinimumVersion 11

# Results in clear error message:
# "SQL Server version 11 required - server not supported."

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago Changed · -31 lines 6b58253fa6f7
  2. 1mo ago First seen · 141 lines · 0 tokens per session scan A 864c6924c342

Subscribe to this mod's changes

sql-version-support is a command published in the GitHub repository dataplat/dbatools (2,858 stars, last pushed 4d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,707 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-10.

Related

sql-version-support compared with commands from other repositories

sql-version-support next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
sql-version-supportdataplat/dbatoolsCommand2.9k4d agoMITA0GitHub Copilot
sql-migrationswshobson/agentsCommand42kyesterdayMITA18Claude Code
vd-scaffold4pixeltechBR/VibeDevCommand1716d agoMITA0Claude Code
databaseAsiaOstrich/universal-dev-standardsCommand842d agononeA0Claude Code
sql-migrationsHermeticOrmus/LibreUIUX-Claude-CodeCommand1151mo agoMITA18Claude Code
sql-migrationsHermeticOrmus/claude-code-game-developmentCommand781mo agoMITA18Claude Code
sql-developerhmohamed01/claude-code-pluginsCommand71mo agononeA26Claude Code