sqldb-operations-cli

Diagnose SQL database in Fabric performance via sqlcmd against Query Store, DMVs, and Extended Events.

Updated Jul 14, 2026
One-click install
npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill sqldb-operations-cli-9vantage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sqldb-operations-cli
Source: https://github.com/9vantage/skills-for-fabric-clone/tree/main/plugins/fabric-operations/skills/sqldb-operations-cli
Command: npx skills add https://github.com/9vantage/skills-for-fabric-clone --skill sqldb-operations-cli-9vantage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? When a SQL database in Fabric runs slowly, blocks sessions, or regresses unexpectedly, finding the root cause requires deep diagnostic queries against Query Store, DMVs, and resource stats that are hard to write and interpret from scratch. ## Core Features & Use Cases - Performance Investigation: Identify top resource-consuming, volatile, and recently regressed queries using Query Store and sys.dm_db_resource_stats, with wait-category root cause analysis. - Blocking Diagnostics: Detect live blocking chains and head blockers, or capture intermittent blocking with a database-scoped Extended Events session that is cleaned up afterward. - Index and Statistics Health: Check auto-tuning recommendations first, then rank DMV missing-index suggestions and detect stale statistics before proposing DDL. - Use Case: A user reports intermittent slowness; the skill runs volatile query detection (CV% analysis), follows the wait-category decision tree, and pinpoints plan instability or blocking as the cause. ## Quick Start Ask the AI to diagnose why your SQL database in Fabric is slow using the sqldb-operations-cli skill against the OLTP endpoint.

Frequently Asked Questions about sqldb-operations-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find the slowest queries in SQL database in Fabric?

Query the Query Store views (sys.query_store_query, sys.query_store_runtime_stats) via sqlcmd against the OLTP endpoint to rank queries by duration, CPU, or logical IO. The skill provides ready-made T-SQL for top resource consumers over the last hour or 24 hours.

How to diagnose blocking sessions in Fabric SQL database?

Run the live blocking queries against sys.dm_exec_requests and sys.dm_exec_sessions to identify blocked sessions, the head blocker, and the blocking chain. For intermittent blocking, create a database-scoped Extended Events session with a ring_buffer target, then clean it up afterward.

Why does sys.query_store_query return an invalid object error in Fabric?

This error occurs when connecting to the SQL analytics endpoint, which has no Query Store or DMVs. Connect to the SQL database (OLTP) endpoint instead to run diagnostic queries.

Should I manually create indexes in SQL database in Fabric?

Check sys.dm_db_tuning_recommendations first because auto-tuning is enabled by default and may create the index automatically. Only use DMV missing-index recommendations, ranked by index_advantage, when auto-tuning has nothing pending.

What permissions are needed for SQL database performance diagnostics?

You need VIEW DATABASE STATE to query DMVs and Query Store views, and ALTER ANY EVENT SESSION to create Extended Events sessions for capturing intermittent blocking. Grant these to the investigating user identity.

What diagnostic features are unsupported in SQL database in Fabric?

Server-scoped DMVs like sys.dm_os_*, trace flags, DBCC TRACEON, and server-scoped or file-target Extended Events are not supported. Use sys.dm_db_resource_stats, Query Store, and database-scoped XE sessions with ring_buffer targets instead.