[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6F421KYMNJETTJPXQCZFVBH":3,"skill-same:01M6F421KYMNJETTJPXQCZFVBH":82},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":32,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":61,"install":62,"resources":75},"01M6F421KYMNJETTJPXQCZFVBH","azure-sql",null,"Provision Azure SQL Database and Cosmos DB. Configure security, backups, and replication. Use when deploying managed databases on Azure.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",13,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-azure-sql\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"azure sql","sql","azure","2026","security","sql database","when","managed","relevant","scripts","critical","os","db","platform","main","community","configure security","databases","only","configure","access","devops-security","database","azure sql database","2026-11-10 10:12:30",false,"---\nname: azure-sql\ndescription: Provision Azure SQL Database and Cosmos DB. Configure security, backups,\n  and replication. Use when deploying managed databases on Azure.\ncategory: devops\nrisk: critical\nsource: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\nsource_repo: BagelHole\u002FDevOps-Security-Agent-Skills\nsource_type: community\ndate_added: '2026-09-20'\nlicense: MIT\nlicense_source: https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE\ncompatibility: Requires the relevant OS\u002Fplatform tooling and privileged access where\n  noted. Docs-only; helper scripts and templates not bundled.\nmetadata:\n  author: devops-skills\n  version: '1.0'\n---\n\n# Azure SQL\n\nDeploy and manage Azure SQL Database, Elastic Pools, and Cosmos DB. Covers server provisioning, firewall rules, geo-replication, backup strategies, performance tuning, security hardening, and Terraform configurations.\n\n## Prerequisites\n\nThese independent examples provision billable resources and can interrupt databases. Confirm subscription, unique names, region\u002FSKU support, SQL_ADMIN_GROUP_ID, cost ceilings, retention\u002FRPO\u002FRTO and tested restore\u002Ffailover procedures. Use Entra-only authentication below; never put passwords\u002Fkeys in argv or tracked configuration. Public firewall\u002FVNet rules do not enable a server with public access disabled: configure private endpoints, DNS and an authorized client network. A regional replica is asynchronous and failover can lose data. Cosmos indexing-policy.json and referenced network\u002Fsecondary-server\u002Fstorage resources are external prerequisites, not bundled. Choose database-shared or dedicated container throughput and review costs; converting manual throughput to autoscale may require the dedicated migrate operation.\n\n## Prerequisites\n\n```bash\n# Install Azure CLI\n# Prerequisite: organization-approved Azure CLI installed from a verified signed package.\naz version\n\n# Login and set subscription\naz login\naz account set --subscription \"my-subscription-id\"\n\n# Create resource group\naz group create --name database-rg --location eastus\n```\n\n## SQL Server and Database Creation\n\n### Create SQL Server\n\n```bash\n# Create logical SQL server\naz sql server create \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver \\\n  --location eastus \\\n  --enable-ad-only-auth \\\n  --external-admin-principal-type Group \\\n  --external-admin-name \"SQL Admins\" \\\n  --external-admin-sid \"$SQL_ADMIN_GROUP_ID\" \\\n  --enable-public-network false \\\n  --minimal-tls-version 1.2\n\n# Enable Azure AD authentication\naz sql server ad-admin create \\\n  --resource-group database-rg \\\n  --server-name myapp-sqlserver \\\n  --display-name \"SQL Admins\" \\\n  --object-id \"{aad-group-object-id}\"\n\n# Enable Azure AD only authentication (disable SQL auth)\naz sql server ad-only-auth enable \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver\n```\n\n### Create Databases\n\n```bash\n# Create General Purpose database\naz sql db create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --edition GeneralPurpose \\\n  --compute-model Serverless \\\n  --auto-pause-delay 60 \\\n  --min-capacity 0.5 \\\n  --max-size 32GB \\\n  --backup-storage-redundancy Geo \\\n  --zone-redundant false\n\n# Create Business Critical database for production\naz sql db create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --edition BusinessCritical \\\n  --service-objective BC_Gen5_4 \\\n  --max-size 256GB \\\n  --backup-storage-redundancy Geo \\\n  --zone-redundant true \\\n  --read-scale Enabled\n\n# Create Hyperscale database for large workloads\naz sql db create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-analytics-db \\\n  --edition Hyperscale \\\n  --service-objective HS_Gen5_4 \\\n  --ha-replicas 2\n\n# List databases on server\naz sql db list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --output table\n```\n\n### Elastic Pools\n\n```bash\n# Create elastic pool\naz sql elastic-pool create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-pool \\\n  --edition GeneralPurpose \\\n  --capacity 4 \\\n  --db-max-capacity 2 \\\n  --db-min-capacity 0.25 \\\n  --max-size 256GB \\\n  --zone-redundant false\n\n# Move database into elastic pool\naz sql db update \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --elastic-pool myapp-pool\n\n# Monitor elastic pool usage\naz sql elastic-pool list-dbs \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-pool \\\n  --output table\n```\n\n## Firewall Rules and Network Security\n\n```bash\n# Keep public access disabled. The 0.0.0.0 AllowAzureServices exception permits other Azure tenants too; do not enable it as a default.\n\n# Allow specific IP range (office network)\naz sql server firewall-rule create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowOffice \\\n  --start-ip-address 203.0.113.0 \\\n  --end-ip-address 203.0.113.255\n\n# Allow your current client IP\naz sql server firewall-rule create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowMyIP \\\n  --start-ip-address \"$APPROVED_CLIENT_IP\" \\\n  --end-ip-address \"$APPROVED_CLIENT_IP\"\n\n# Create VNet rule for subnet access\naz sql server vnet-rule create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowAppSubnet \\\n  --vnet-name spoke-prod-vnet \\\n  --subnet app-subnet\n\n# List firewall rules\naz sql server firewall-rule list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --output table\n\n# Remove a firewall rule\naz sql server firewall-rule delete \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowMyIP\n```\n\n## Geo-Replication and Failover\n\n```bash\n# Create failover group with secondary server\naz sql server create \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver-secondary \\\n  --location westus \\\n  --enable-ad-only-auth \\\n  --external-admin-principal-type Group \\\n  --external-admin-name \"SQL Admins\" \\\n  --external-admin-sid \"$SQL_ADMIN_GROUP_ID\"\n\naz sql failover-group create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-failover-group \\\n  --partner-server myapp-sqlserver-secondary \\\n  --partner-resource-group database-rg \\\n  --failover-policy Automatic \\\n  --grace-period 1 \\\n  --add-db myapp-prod-db\n\n# Check failover group status\naz sql failover-group show \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-failover-group \\\n  --output table\n\n# Manual failover (for testing or planned maintenance)\naz sql failover-group set-primary \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver-secondary \\\n  --name myapp-failover-group\n\n# Create active geo-replication (without failover group)\naz sql db replica create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --partner-server myapp-sqlserver-secondary \\\n  --partner-resource-group database-rg\n```\n\n## Backup and Restore\n\n```bash\n# Configure short-term retention (1-35 days)\naz sql db str-policy set \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --retention-days 14 \\\n  --diffbackup-hours 12\n\n# Configure long-term retention\naz sql db ltr-policy set \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --weekly-retention P4W \\\n  --monthly-retention P12M \\\n  --yearly-retention P5Y \\\n  --week-of-year 1\n\n# Restore database to a point in time\naz sql db restore \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --dest-name myapp-db-restored \\\n  --time \"2026-03-23T10:00:00Z\"\n\n# Restore from long-term backup\naz sql db ltr-backup list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --database myapp-prod-db \\\n  --output table\n\n# BACPAC export needs a separately reviewed supported authentication\u002Fnetwork path.\n# Do not pass admin passwords\u002Fstorage account keys in argv; Entra-only setup above does not support the old SQL-login example.\n# Prefer tested backup\u002Frestore for recovery; BACPAC is not a transaction-log backup.\n\n```\n\n## Performance Tuning\n\n```bash\n# Configure automatic tuning in an authenticated connection to the intended primary\n# database using T-SQL: ALTER DATABASE CURRENT SET AUTOMATIC_TUNING = AUTO;\n# Review the Azure defaults and Query Store state before applying; this is not an az sql db subcommand.\n\n# Check database performance recommendations\naz sql db advisor list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --database myapp-prod-db \\\n  --output table\n\n# Scale database tier\naz sql db update \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --service-objective BC_Gen5_8\n\n# Enable Query Store (via SQL)\n# sqlcmd -S myapp-sqlserver.database.windows.net -d myapp-prod-db -Q \"ALTER DATABASE [myapp-prod-db] SET QUERY_STORE = ON\"\n\n# View DTU\u002FvCore usage metrics\naz monitor metrics list \\\n  --resource \"\u002Fsubscriptions\u002F{sub}\u002FresourceGroups\u002Fdatabase-rg\u002Fproviders\u002FMicrosoft.Sql\u002Fservers\u002Fmyapp-sqlserver\u002Fdatabases\u002Fmyapp-prod-db\" \\\n  --metric \"cpu_percent\" \"dtu_consumption_percent\" \"storage_percent\" \\\n  --interval PT1H \\\n  --output table\n```\n\n## Security Hardening\n\n```bash\n# Enable Advanced Threat Protection\naz sql db threat-policy update \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --state Enabled \\\n  --email-addresses security@example.com \\\n  --email-account-admins true\n\n# Enable auditing to storage\naz sql server audit-policy update \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver \\\n  --state Enabled \\\n  --storage-account mystorageacct \\\n  --retention-days 90\n\n# Enable auditing to Log Analytics\naz sql server audit-policy update \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver \\\n  --state Enabled \\\n  --lats Enabled \\\n  --lawri \"\u002Fsubscriptions\u002F{sub}\u002FresourceGroups\u002F{rg}\u002Fproviders\u002FMicrosoft.OperationalInsights\u002Fworkspaces\u002F{workspace}\"\n\n# Enable Transparent Data Encryption (enabled by default)\naz sql db tde set \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --database myapp-prod-db \\\n  --status Enabled\n\n# Enable vulnerability assessment\n# Configure the supported Defender for SQL vulnerability-assessment policy for this logical server; az sql vm targets SQL on Azure VMs, a different resource type.\n```\n\n## Cosmos DB\n\n```bash\n# Create Cosmos DB account with SQL API\naz cosmosdb create \\\n  --resource-group database-rg \\\n  --name myapp-cosmos \\\n  --default-consistency-level Session \\\n  --locations regionName=eastus failoverPriority=0 isZoneRedundant=true \\\n  --locations regionName=westus failoverPriority=1 isZoneRedundant=false \\\n  --enable-automatic-failover true \\\n  --enable-multiple-write-locations false\n\n# Create database\naz cosmosdb sql database create \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --name myappdb \\\n  --throughput 400\n\n# Create container with partition key\naz cosmosdb sql container create \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --database-name myappdb \\\n  --name orders \\\n  --partition-key-path \"\u002FcustomerId\" \\\n  --throughput 400 \\\n  --idx @indexing-policy.json\n\n# Migrate this dedicated-throughput container from manual to autoscale first.\naz cosmosdb sql container throughput migrate \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --database-name myappdb \\\n  --name orders \\\n  --throughput-type autoscale\n\n# After migration completes, set the approved autoscale maximum.\naz cosmosdb sql container throughput update \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --database-name myappdb \\\n  --name orders \\\n  --max-throughput 4000\n```\n\n\n## Contents\n\n- [Terraform Configuration](references\u002Fdetails.md)\n- [Troubleshooting](references\u002Fdetails.md)\n- [Related Skills](references\u002Fdetails.md)\n\n## When to Use\n\n- You need a fully managed relational database on Azure.\n- Your application requires geo-replication for disaster recovery.\n- You need elastic scaling across multiple databases with Elastic Pools.\n- You are migrating on-premises SQL Server workloads to the cloud.\n- You need a globally distributed NoSQL database (Cosmos DB).\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n","# Azure SQL\n\nDeploy and manage Azure SQL Database, Elastic Pools, and Cosmos DB. Covers server provisioning, firewall rules, geo-replication, backup strategies, performance tuning, security hardening, and Terraform configurations.\n\n## Prerequisites\n\nThese independent examples provision billable resources and can interrupt databases. Confirm subscription, unique names, region\u002FSKU support, SQL_ADMIN_GROUP_ID, cost ceilings, retention\u002FRPO\u002FRTO and tested restore\u002Ffailover procedures. Use Entra-only authentication below; never put passwords\u002Fkeys in argv or tracked configuration. Public firewall\u002FVNet rules do not enable a server with public access disabled: configure private endpoints, DNS and an authorized client network. A regional replica is asynchronous and failover can lose data. Cosmos indexing-policy.json and referenced network\u002Fsecondary-server\u002Fstorage resources are external prerequisites, not bundled. Choose database-shared or dedicated container throughput and review costs; converting manual throughput to autoscale may require the dedicated migrate operation.\n\n## Prerequisites\n\n```bash\n# Install Azure CLI\n# Prerequisite: organization-approved Azure CLI installed from a verified signed package.\naz version\n\n# Login and set subscription\naz login\naz account set --subscription \"my-subscription-id\"\n\n# Create resource group\naz group create --name database-rg --location eastus\n```\n\n## SQL Server and Database Creation\n\n### Create SQL Server\n\n```bash\n# Create logical SQL server\naz sql server create \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver \\\n  --location eastus \\\n  --enable-ad-only-auth \\\n  --external-admin-principal-type Group \\\n  --external-admin-name \"SQL Admins\" \\\n  --external-admin-sid \"$SQL_ADMIN_GROUP_ID\" \\\n  --enable-public-network false \\\n  --minimal-tls-version 1.2\n\n# Enable Azure AD authentication\naz sql server ad-admin create \\\n  --resource-group database-rg \\\n  --server-name myapp-sqlserver \\\n  --display-name \"SQL Admins\" \\\n  --object-id \"{aad-group-object-id}\"\n\n# Enable Azure AD only authentication (disable SQL auth)\naz sql server ad-only-auth enable \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver\n```\n\n### Create Databases\n\n```bash\n# Create General Purpose database\naz sql db create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --edition GeneralPurpose \\\n  --compute-model Serverless \\\n  --auto-pause-delay 60 \\\n  --min-capacity 0.5 \\\n  --max-size 32GB \\\n  --backup-storage-redundancy Geo \\\n  --zone-redundant false\n\n# Create Business Critical database for production\naz sql db create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --edition BusinessCritical \\\n  --service-objective BC_Gen5_4 \\\n  --max-size 256GB \\\n  --backup-storage-redundancy Geo \\\n  --zone-redundant true \\\n  --read-scale Enabled\n\n# Create Hyperscale database for large workloads\naz sql db create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-analytics-db \\\n  --edition Hyperscale \\\n  --service-objective HS_Gen5_4 \\\n  --ha-replicas 2\n\n# List databases on server\naz sql db list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --output table\n```\n\n### Elastic Pools\n\n```bash\n# Create elastic pool\naz sql elastic-pool create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-pool \\\n  --edition GeneralPurpose \\\n  --capacity 4 \\\n  --db-max-capacity 2 \\\n  --db-min-capacity 0.25 \\\n  --max-size 256GB \\\n  --zone-redundant false\n\n# Move database into elastic pool\naz sql db update \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --elastic-pool myapp-pool\n\n# Monitor elastic pool usage\naz sql elastic-pool list-dbs \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-pool \\\n  --output table\n```\n\n## Firewall Rules and Network Security\n\n```bash\n# Keep public access disabled. The 0.0.0.0 AllowAzureServices exception permits other Azure tenants too; do not enable it as a default.\n\n# Allow specific IP range (office network)\naz sql server firewall-rule create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowOffice \\\n  --start-ip-address 203.0.113.0 \\\n  --end-ip-address 203.0.113.255\n\n# Allow your current client IP\naz sql server firewall-rule create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowMyIP \\\n  --start-ip-address \"$APPROVED_CLIENT_IP\" \\\n  --end-ip-address \"$APPROVED_CLIENT_IP\"\n\n# Create VNet rule for subnet access\naz sql server vnet-rule create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowAppSubnet \\\n  --vnet-name spoke-prod-vnet \\\n  --subnet app-subnet\n\n# List firewall rules\naz sql server firewall-rule list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --output table\n\n# Remove a firewall rule\naz sql server firewall-rule delete \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name AllowMyIP\n```\n\n## Geo-Replication and Failover\n\n```bash\n# Create failover group with secondary server\naz sql server create \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver-secondary \\\n  --location westus \\\n  --enable-ad-only-auth \\\n  --external-admin-principal-type Group \\\n  --external-admin-name \"SQL Admins\" \\\n  --external-admin-sid \"$SQL_ADMIN_GROUP_ID\"\n\naz sql failover-group create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-failover-group \\\n  --partner-server myapp-sqlserver-secondary \\\n  --partner-resource-group database-rg \\\n  --failover-policy Automatic \\\n  --grace-period 1 \\\n  --add-db myapp-prod-db\n\n# Check failover group status\naz sql failover-group show \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-failover-group \\\n  --output table\n\n# Manual failover (for testing or planned maintenance)\naz sql failover-group set-primary \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver-secondary \\\n  --name myapp-failover-group\n\n# Create active geo-replication (without failover group)\naz sql db replica create \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --partner-server myapp-sqlserver-secondary \\\n  --partner-resource-group database-rg\n```\n\n## Backup and Restore\n\n```bash\n# Configure short-term retention (1-35 days)\naz sql db str-policy set \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --retention-days 14 \\\n  --diffbackup-hours 12\n\n# Configure long-term retention\naz sql db ltr-policy set \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --weekly-retention P4W \\\n  --monthly-retention P12M \\\n  --yearly-retention P5Y \\\n  --week-of-year 1\n\n# Restore database to a point in time\naz sql db restore \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-db \\\n  --dest-name myapp-db-restored \\\n  --time \"2026-03-23T10:00:00Z\"\n\n# Restore from long-term backup\naz sql db ltr-backup list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --database myapp-prod-db \\\n  --output table\n\n# BACPAC export needs a separately reviewed supported authentication\u002Fnetwork path.\n# Do not pass admin passwords\u002Fstorage account keys in argv; Entra-only setup above does not support the old SQL-login example.\n# Prefer tested backup\u002Frestore for recovery; BACPAC is not a transaction-log backup.\n\n```\n\n## Performance Tuning\n\n```bash\n# Configure automatic tuning in an authenticated connection to the intended primary\n# database using T-SQL: ALTER DATABASE CURRENT SET AUTOMATIC_TUNING = AUTO;\n# Review the Azure defaults and Query Store state before applying; this is not an az sql db subcommand.\n\n# Check database performance recommendations\naz sql db advisor list \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --database myapp-prod-db \\\n  --output table\n\n# Scale database tier\naz sql db update \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --service-objective BC_Gen5_8\n\n# Enable Query Store (via SQL)\n# sqlcmd -S myapp-sqlserver.database.windows.net -d myapp-prod-db -Q \"ALTER DATABASE [myapp-prod-db] SET QUERY_STORE = ON\"\n\n# View DTU\u002FvCore usage metrics\naz monitor metrics list \\\n  --resource \"\u002Fsubscriptions\u002F{sub}\u002FresourceGroups\u002Fdatabase-rg\u002Fproviders\u002FMicrosoft.Sql\u002Fservers\u002Fmyapp-sqlserver\u002Fdatabases\u002Fmyapp-prod-db\" \\\n  --metric \"cpu_percent\" \"dtu_consumption_percent\" \"storage_percent\" \\\n  --interval PT1H \\\n  --output table\n```\n\n## Security Hardening\n\n```bash\n# Enable Advanced Threat Protection\naz sql db threat-policy update \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --name myapp-prod-db \\\n  --state Enabled \\\n  --email-addresses security@example.com \\\n  --email-account-admins true\n\n# Enable auditing to storage\naz sql server audit-policy update \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver \\\n  --state Enabled \\\n  --storage-account mystorageacct \\\n  --retention-days 90\n\n# Enable auditing to Log Analytics\naz sql server audit-policy update \\\n  --resource-group database-rg \\\n  --name myapp-sqlserver \\\n  --state Enabled \\\n  --lats Enabled \\\n  --lawri \"\u002Fsubscriptions\u002F{sub}\u002FresourceGroups\u002F{rg}\u002Fproviders\u002FMicrosoft.OperationalInsights\u002Fworkspaces\u002F{workspace}\"\n\n# Enable Transparent Data Encryption (enabled by default)\naz sql db tde set \\\n  --resource-group database-rg \\\n  --server myapp-sqlserver \\\n  --database myapp-prod-db \\\n  --status Enabled\n\n# Enable vulnerability assessment\n# Configure the supported Defender for SQL vulnerability-assessment policy for this logical server; az sql vm targets SQL on Azure VMs, a different resource type.\n```\n\n## Cosmos DB\n\n```bash\n# Create Cosmos DB account with SQL API\naz cosmosdb create \\\n  --resource-group database-rg \\\n  --name myapp-cosmos \\\n  --default-consistency-level Session \\\n  --locations regionName=eastus failoverPriority=0 isZoneRedundant=true \\\n  --locations regionName=westus failoverPriority=1 isZoneRedundant=false \\\n  --enable-automatic-failover true \\\n  --enable-multiple-write-locations false\n\n# Create database\naz cosmosdb sql database create \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --name myappdb \\\n  --throughput 400\n\n# Create container with partition key\naz cosmosdb sql container create \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --database-name myappdb \\\n  --name orders \\\n  --partition-key-path \"\u002FcustomerId\" \\\n  --throughput 400 \\\n  --idx @indexing-policy.json\n\n# Migrate this dedicated-throughput container from manual to autoscale first.\naz cosmosdb sql container throughput migrate \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --database-name myappdb \\\n  --name orders \\\n  --throughput-type autoscale\n\n# After migration completes, set the approved autoscale maximum.\naz cosmosdb sql container throughput update \\\n  --resource-group database-rg \\\n  --account-name myapp-cosmos \\\n  --database-name myappdb \\\n  --name orders \\\n  --max-throughput 4000\n```\n\n\n## Contents\n\n- [Terraform Configuration](references\u002Fdetails.md)\n- [Troubleshooting](references\u002Fdetails.md)\n- [Related Skills](references\u002Fdetails.md)\n\n## When to Use\n\n- You need a fully managed relational database on Azure.\n- Your application requires geo-replication for disaster recovery.\n- You need elastic scaling across multiple databases with Elastic Pools.\n- You are migrating on-premises SQL Server workloads to the cloud.\n- You need a globally distributed NoSQL database (Cosmos DB).\n\n## Limitations\n\n- Infrastructure commands can disrupt services: confirm target host\u002Fscope and have backups\u002Fsnapshots before mutating state.\n- Docs-only import: upstream scripts and templates not bundled.\n\n",{"name":5,"risk":28,"source":47,"license":14,"category":48,"metadata":49,"date_added":52,"description":7,"source_repo":53,"source_type":33,"compatibility":54,"license_source":55},"https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills","devops",{"author":50,"version":51},"devops-skills","1.0","2026-09-20","BagelHole\u002FDevOps-Security-Agent-Skills","Requires the relevant OS\u002Fplatform tooling and privileged access where noted. Docs-only; helper scripts and templates not bundled.","https:\u002F\u002Fgithub.com\u002FBagelHole\u002FDevOps-Security-Agent-Skills\u002Fblob\u002Fmain\u002FLICENSE","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Fantigravity-azure-sql",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-14 14:18:11",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add boisenoise\u002Fskills-collections --skill azure-sql",{"tool":68,"command":69},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill azure-sql",{"tool":71,"command":72},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill azure-sql","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-azure-sql\u002FSKILL.md",true,[76],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Fdetails.md","REFERENCE","参考文档",4488,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-azure-sql\u002Freferences\u002Fdetails.md",[83,92,100,109,117,125],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":91},"01M7B6HREHB53EHGGVZND7DDXN","scrapely-scrape","Collect web data with ready-made Scrape.ly scrapers: Google Maps places, Amazon products, LinkedIn jobs, reviews, social posts. Use when the user wants structured data from a site.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-scrapely-scrape\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":91},"01M7B6GDNNN4HE662KA6KPF7GW","lumify-odds","Lumify's hosted sports MCP\u002FREST API for sportsbook odds, line-movement history, public betting splits, and player props across MLB, NFL, NBA, NHL, soccer, tennis, NCAAF, NCAAB. Read-only market data.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lumify-odds\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":107,"publishedAt":108},"01M743PZMJW2GEKG5J199GPSK7","sync-lipsync","Lip-sync an existing video of a real person to new audio or a typed script with sync. labs through its hosted MCP server, quoting the cost and waiting for approval first.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-sync-lipsync\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":113,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":108},"01M743MMN3CKTJVNRSZMB684E5","music-for-robots","Optional music-inspired creative exercise for multimodal agents. Ingests an unquantized acoustic MP3 composition by Michael Luchtan (Music For Robots) into a private temporary directory, analyzing microtiming and texture to inspire creative writing, brainstorming, or technical tasks.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-music-for-robots\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":121,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":108},"01M743KC2GN5WE11BSTWSSWD8B","imagera-media","Generate or edit images, video clips, voiceovers and music through the hosted Imagera MCP server, quoting the credit cost and getting approval before each paid call.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-imagera-media\u002FSKILL.md",[],[],{"skillNo":126,"name":127,"nameZh":6,"description":128,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":129,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":108},"01M743HDJNZQA8A4VT68NWGWQJ","deja-history","Search this machine's past AI coding sessions across Claude Code, Codex, Cursor, Gemini CLI and thirty-nine other agents before editing, debugging, or denying something exists.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-deja-history\u002FSKILL.md",[],[]]