/sql-migration-advisor:get-connection-detailsfrom sql-migration-advisor
Diagnoses Azure SQL connection failures and composes connection strings for Azure SQL Database, Managed Instance, SQL Server on Azure VM, and Fabric. Handles timeouts, login errors, firewall/NSG rules, and cross-network issues.
Ships in sql-migration-advisor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Connection configuration and failure diagnosis for the Azure SQL family.
Facts carry a status. VERIFIED means a Microsoft page and a matching quote sit behind that exact row. DERIVED means the page is cited but the row carries no quote of its own — say so rather than presenting it as verified. CONFLICT and OPEN must be surfaced to the user, never resolved silently. Ten source pages are re-checked weekly for drift; that is ten pages, not every fact.
Knowledge base: docs/sql-server-to-azure-migration-connectivity.md v0.10 ·
structured source: reference/connectivity-matrix.json
Read reference/connectivity-matrix.json,
reference/input-contract.md and
reference/output-contract.md before answering. Only SKILL.md
arrives with the skill, so those three have to be opened. If one cannot be read, name it and stop:
a port number or a driver requirement recalled rather than read is one nobody can check.
Two jobs that look like one, because the user rarely knows which of the two they have:
It does not choose a migration target. That is recommend-migration-path. This skill picks up
where that one stops: you are on Managed Instance — here is how you connect, and here is what to
open.
<placeholder> markers and point at managed identity or Key Vault.Connectivity is not a rules graph. Each element of the answer depends on a small, independent slice of the input:
| Output | Depends on |
|---|---|
| FQDN | target × network path |
| Port(s) | target × connection policy |
| Auth keyword | auth mode × driver |
| Network prerequisites | network path |
| Identity prerequisites | auth mode × target |
This is why the skill can be tested exhaustively, and why it does not need the ordered ranking
phases that recommend-migration-path requires.
Ask one question at a time. Accept "I don't know" and carry it as unknown rather than defaulting.
azure-sql-database · azure-sql-managed-instance · sql-server-on-azure-vm
· fabric-sql-database · fabric-warehousepublic-endpoint · private-endpoint · vnet-local ·
service-endpoint.public. and is a
different host from the VNet-local one, and both Fabric hostnames must be read rather than built.Default connection policy
this changes the required ports.entra-default · entra-interactive · entra-device-code ·
entra-managed-identity-system · entra-managed-identity-user · entra-service-principal ·
entra-integrated · windows-integrated · sql-authenticationdotnet-sqlclient · jdbc · odbc · pyodbc ·
go-mssqldb · sqlcmd · bcp · ssms. The version decides whether a keyword exists at all,
and for sqlcmd you also need to know whether it is the Go or the ODBC build.Ask these when they apply, because the answer changes without them:
Public network access enabled, and what minimum TLS version is set?
Both refuse the connection before any port or DNS question matters.Skip any question the user has already answered, and skip the driver question when the user only wants ports. When a needed answer is unavailable, say which part of the answer it blocks rather than producing a value that looks complete.
One card, always in the same order, so a reader can find the port without reading prose:
State the knowledge-base version in every card. A reader who cannot tell which facts answered cannot judge how much to trust the advice, nor reproduce it later.
Representative output — composing a connection
Azure SQL Managed Instance · public endpoint · port 3342 · connection type Proxy (forced) KB v0.10 · endpoint and port VERIFIED · JDBC keyword VERIFIED
The public endpoint is a different hostname from the VNet-local one —
.public.is inserted — and it must be enabled on the instance. A string built for the VNet-local endpoint cannot reach it by changing networks: both the host and the port change.jdbc:sqlserver://<mi-name>.public.<dns-zone>.database.windows.net:3342;databaseName=<database>;authentication=ActiveDirectoryManagedIdentity;encrypt=true;trustServerCertificate=false
Requirement Public endpoint Must be enabled on the instance. It is off by default Hostname <mi-name>.public.<dns-zone>.database.windows.net— read it from the portal, do not compose itPort 3342 inbound, across the subnet range — the underlying address can change Connection type Proxy, forced. The instance-level setting is ignored on this endpoint Driver ActiveDirectoryManagedIdentityneeds JDBC 12.2+; for a user-assigned identity addmsiClientIdIdentity The managed identity must exist as a user inside the target database Not usable for Failover groups and Managed Instance link — client traffic only What will break it — setting the instance connection type to Redirect. It is ignored here, so the change looks applied and does nothing.
Verify —
Test-NetConnection <mi-name>.public.<dns-zone>.database.windows.net -Port 3342. Success proves TCP reaches that port and nothing more; a failure does not by itself identify the NSG as the cause.
Representative output — diagnosing a failure
Error 18456 from one network only · leading hypothesis DNS override KB v0.10 · the DNS-override behaviour is VERIFIED; the attribution to this case is a hypothesis
The gateway validates the FQDN it receives against the target server. A name pinned to a retired gateway address is rejected by design, and the rejection is reported as a login failure. The same cause produces 40532 and 40615.
Hypothesis A DNS override pins the server FQDN to a stale gateway address Evidence for The credential works from other networks, and the failure is confined to one Discriminating test Compare client resolution with authoritative DNS. A mismatch confirms it; a match rules it out If it is ruled out Next candidates are a network-scoped firewall rule, a proxy or appliance rewriting the connection, and a client-side certificate or TLS policy Why the symptom misleads — the error names authentication, so the natural next steps are resetting the secret and re-granting the user. Both are likely to find nothing here, but the credential is not proven correct until the discriminating test comes back.
Verify —
Resolve-DnsName -Name "<server>.database.windows.net" -DnsOnly, compared with authoritative DNS.
Examples use sanitised placeholders. Keep customer names, tenant details, server names and subscription identifiers out of them.
Diagnose in hypotheses, never in exonerations. State the leading hypothesis, the evidence for it, and the one test that would disprove it. A passing network check proves only what it tested: it does not clear the credential, the firewall, DNS, a route table or an appliance in between.
When a fact is missing, say so in the same card. A row the knowledge base lists as open research is reported as unknown with the page to read, never filled with a plausible value. An invented connection keyword fails at runtime and costs more than an admitted gap.
These are the failures that recur, and each is a fact a general-purpose answer usually gets wrong.
| Trap | What actually happens |
|---|---|
| MI public endpoint is a different hostname and port | .public. is inserted and the port is 3342. It is not the same string on another network, and the endpoint must be enabled |
| MI redirect ports are disputed | The connection-types page documents 1433 across the subnet; Microsoft's own Bicep and ARM quickstarts still create an 11000–11999 rule. Present both, recommend testing 1433 first, and never call opening a range harmless |
| SQL Database redirect needs 1433 and 11000–11999 | Opening 1433 alone survives the handshake, then fails |
| SQL Database private endpoint needs 1433–65535 | Not the public-endpoint range. Opening 11000–11999 there still fails |
Default policy changes with client location | The same app has different firewall needs in Azure and on a laptop |
| A private endpoint keeps the FQDN, but not always | For MI, a private endpoint in the same VNet as the instance is a different case: the generic privatelink zone can disturb the instance. Ask for the topology first |
| A pinned FQDN breaks when a gateway is retired | Produces 18456 / 40532 / 40615, which all look like credential problems |
| SqlClient 7.0 moved Entra out of the core package | A failed connection whose cause is a missing NuGet package — unless the application supplies its own token, in which case the extension is not needed |
| Fabric forbids SQL authentication | On both Fabric surfaces. Eliminates a whole class of connection string |
proxyOverride=Default means opposite things | Redirect if set after October 2025, Proxy if before |
| Public network access and TLS gate the connection first | Errors 47073 and 47072 fire before any port or DNS question matters |
Where the environment allows, propose — and only then run — a check that makes the answer falsifiable:
If a tool is missing or the network is unavailable, say the check could not be run. Never report a check that did not execute.
All facts come from docs/sql-server-to-azure-migration-connectivity.md
and its structured source reference/connectivity-matrix.json.
The interview and the answer are governed by this skill's own contracts:
reference/input-contract.md — the identifiers the interview may
produce, the three absence markers, question order, and the combinations that are invalid rather
than merely unusual.reference/output-contract.md — the two card shapes, the 13
invariants checked before an answer is shown, the machine-readable form, and when to refuse.These are separate from the recommend-migration-path contracts at the repository root. The
two skills share a repository and a plugin, not a vocabulary.
Every stated fact carries a source and a matched quote. That is the floor, not a guarantee: a quote proves the cell it supports, not the whole row, not the scope of the claim. Three external audits each found rows where that distinction had been lost — see §7.6 of the knowledge base.
Anything that could not be quoted is not stated at all. It appears in the open-research list (§7.5), and the skill says it does not know rather than reasoning towards a plausible answer.
One fact is an open conflict: whether MI redirect requires 11000–11999 alongside 1433 (§7.1). State both readings and the safe recommendation. The Fabric FQDNs (§7.2) are portal-derived and must never be composed.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub fredgis/sql-migration-advisor --plugin sql-migration-advisor3 skills in this plugin
/generate-migration-prerequisite-planBuilds a sourced, scenario-specific prerequisite plan for a SQL Server to Azure migration path. Consumes the structured output of recommend-migration-path or works standalone from a known target and method, asks only unresolved path-specific questions, and returns a readiness summary plus detailed prerequisites as polished Markdown, structured JSON, or both. Trigger when the user asks what must be ready before executing a recommended SQL migration, wants a migration prerequisites checklist, or asks for a partner-ready readiness plan./recommend-migration-pathPreliminary SQL Server to Azure migration disposition and recommended assessment path. Runs a short guided interview, then applies a source-verified knowledge base to pre-select candidate targets (SQL VM, AVS, SQL MI, SQL DB, Fabric SQL DB, Arc SQL MI, container or Arc in-place), migration methods (MI Link, LRS, backup/restore, DAG/AG, modern DMS, transactional replication, BACPAC, Fabric Migration Assistant), blockers, evidence gaps, cost levers and Microsoft program fit. Trigger when the user wants to migrate or modernize SQL Server to Azure, asks for the best or recommended migration path, target or tool, or says 'migrer SQL Server', 'migrate SQL Server' or 'SQL to Azure'.