Azure SQL 自动索引演示
run-handsfree-indexing
准备、部署、验证、演练、监控或清理 SQLCon EU 2026 Caldova 免手动索引演示。用于 Azure SQL 自动索引、自动索引压缩、Hyperscale 仪表板工作负载、索引膨胀、压缩进度,或该演示的 Azure 部署脚本。
- License 许可
- MIT
- 最近更新
- 2026-11-01
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- run-handsfree-indexing
- description
- Prepare, deploy, validate, rehearse, monitor, or clean up the SQLCon EU 2026 Caldova Hands-Free Indexing demo. Use for Azure SQL automatic indexing, Automatic Index Compaction, the Hyperscale dashboard workload, index bloat, compaction progress, or the demo's Azure deployment scripts.
- argument-hint
- Mode: prepare, deploy, preflight, rehearse, status, or cleanup
03 SKILL.md 正文
Run Hands-Free Indexing
Guide the user through the existing Azure SQL Database Hyperscale demo. Treat
the package README and
demo runbook as the
sources of truth. Run only the wrappers in deploy; do not reproduce their
Azure CLI or SQL logic manually.
Invariants
- Use the unchanged
demo.usp_PatientAccessDashboardprocedure. - The qualifying nonclustered index must be created by Azure SQL and report
auto_created = 1. - Never create a manual fallback index, force a plan, add a query hint, or drop and recreate the automatic index.
- Bloat and compaction eligibility must use the existing bounded insert/delete workloads. Never update surviving rows.
- Pair
DETAILEDphysical statistics with the latest real dashboard duration and logical reads. Never invent or interpolate measurements.
Safety Rules
- Confirm the Azure account, tenant, subscription, resource group, SQL region, App Service region, and vCore count before deployment.
- Explain that deployment creates billable Azure SQL Hyperscale, App Service,
networking, private endpoint, and DNS resources. Require explicit user
approval immediately before
01-deploy-infrastructure.ps1. - Require explicit approval before database initialization, bloat creation, enabling compaction, and cleanup.
99-remove.ps1deletes the entire configured resource group. Show the exact resource group and require confirmation before running it; do not suppress its PowerShell confirmation.- Do not request credentials in chat. Authentication must use Azure CLI, Microsoft Entra, and managed identity as implemented by the scripts.
- Do not print access tokens or broaden the exact-IP bootstrap firewall rule.
Select a Mode
prepare: validate tools, identity, configuration, and feature availability.deploy: run the four documented deployment steps with approval gates.preflight: verify an existing environment without changing it.rehearse: guide the measured indexing lifecycle one phase at a time.status: capture the current documented state once; do not poll continuously.cleanup: remove the dedicated resource group after explicit confirmation.
Prepare
- Read
deploy\00-config.ps1; do not run it directly. - Require PowerShell 7, Azure CLI, go-sqlcmd, and the .NET 10 SDK.
- Require
AZURE_SUBSCRIPTION_ID. Accept only the documented optionalCALDOVA_*environment overrides. - Use read-only account checks to confirm the active identity and that the
configured subscription matches
AZURE_SUBSCRIPTION_ID. - Confirm the selected SQL region supports the Automatic Index Compaction
preview. If this cannot be verified, stop and mark the gate
NOT VERIFIED. - Summarize the resolved resource names and locations without exposing tokens.
Deploy
From corenote\handsfreeindexing, run one step at a time and require success
before continuing:
-
After billable-resource approval:
.\deploy\01-deploy-infrastructure.ps1 -
After confirmation that recreating the isolated demo schema and loading two million rows is intended:
.\deploy\02-initialize-database.ps1 -
Publish the application:
.\deploy\03-publish-app.ps1 -
Verify the deployed environment:
.\deploy\04-verify.ps1
Require an online Hyperscale database, Entra-only authentication, an approved
private endpoint, a running Windows App Service, /healthz = ok, and
/readyz = ready.
Preflight
Run 04-verify.ps1 and report each documented gate. Confirm the presenter can
open the Operations Dashboard and Index Health views. Do not initialize data,
run workload, create bloat, or enable compaction during preflight.
Rehearse
Guide one phase at a time and wait for the user between phases:
- No Nonclustered Index: initialize only if a fresh environment is
explicitly intended; refresh the dashboard and confirm
Missing Index. - Automatic Tuning: run one 15-minute interval with
05-run-workload.ps1, then run06-show-index-recommendation.ps1and07-check-auto-index.ps1. If the index is not ready, stop and tell the user to repeat later. Never loop unattended. - Create Real Bloat: only after
auto_created = 1is proven and the user approves, run08-create-bloat.ps1. Refresh the dashboard, then run10-check-progress.ps1once. - Automatic Index Compaction: after approval, run
09-enable-compaction.ps1. On user request, refresh the dashboard and run10-check-progress.ps1once per observation. - Complete only when measured telemetry shows materially fewer pages, higher density, and recovered query performance. Preserve the runbook's final presentation message.
Automatic tuning and compaction are asynchronous. Do not claim completion from elapsed time alone and do not use sleep loops or continuous polling.
Status
Run 10-check-progress.ps1 once and summarize phase, index name,
auto_created, page count, density, logical reads, query duration, and AIC
state from the output. If no paired measurement exists, say so.
Cleanup
Show the resolved resource group, explain that every contained resource will be deleted, obtain explicit confirmation, and then run:
.\deploy\99-remove.ps1
Report that deletion was started; do not claim completion until Azure confirms the resource group no longer exists.
Completion Report
Report mode, subscription name, resource group, commands run, gates passed, current lifecycle phase, and remaining asynchronous or manual work. Do not include tokens or credentials.
04 同仓库更多 Skills
主题演讲演示应用开发
keynote-demo-app
构建或扩展 SQLCon EU 2026 主题演讲演示应用,使其外观和行为与其他主题演讲应用一致。适用于创建新的演示视图(发票、运营、订单)、重新设计现有应用样式以保持一致、为故障排查演示添加刻意设计的数据库反模式,或通过托管标识将应用连接到 Azure SQL 或 Fabric SQL。触发词包括“让它看起来像主题演讲应用”“构建演示视图”“添加慢查询演示”“匹配 Caldova 样式”。
迁移后数据与架构校验
validate-post-migration-data
在将 SQL Server 迁移到 Azure SQL Database、Azure SQL Managed Instance 或 Azure VM 上的 SQL Server 之后,验证数据与架构。适用于迁移、还原、BACPAC 导入、LRS 完成、割接验证、行数比对或源端与目标端对账之后使用。
SQL Server 至 SQL MI 的 LRS 迁移
sql-server-to-sql-mi-lrs-migration
使用托管身份访问 Blob,通过日志重放服务(LRS)将 SQL Server 数据库迁移至 Azure SQL 托管实例。适用于 SQL Server 至 SQL MI、LRS、日志重放、持续还原或低停机时间的备份链迁移。
SQL Server 至 Azure SQL 数据库 BACPAC 迁移
sql-bacpac-to-azure-sql-db-migration
使用离线 BACPAC 工作流,将一个或全部用户数据库从 SQL Server 迁移至 Azure SQL Database。适用于 BACPAC、SqlPackage 导出/导入、批量数据库迁移或离线 Azure SQL Database 迁移请求。
SQL Server 备份还原迁移至 Azure SQL VM
sql-backup-restore-to-azure-sql-vm-migration
将 SQL Server 2008 至 SQL Server 2025 的源端迁移到任意运行位置的 SQL Server 2025 目标端(包括 Azure VM 上的 SQL Server):创建本地完整备份,使用 AzCopy 和操作员的 Microsoft Entra 身份将其上传到 Azure Blob Storage,然后使用目标 SQL Server 的托管标识从 URL 还原。比 SQL Server 2025 更新的源端会被阻止,因为目标端还原兼容性尚未验证。适用于 SQL-to-SQL、本地备份、AzCopy、托管标识、Azure SQL VM 或 SQL Server 2025 还原等迁移场景。
SQL Server 迁移评估请求路由
run-migration-assessment
用于路由泛化或未明确的 SQL Server 评估、就绪度、兼容性、成本和 SKU 推荐请求。当仅有裸服务器名称,或 Azure 与本地/本地部署(on-premises)未明确时使用该技能;先询问适用的源端类型,再进行转交。