Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Azure Resource Manager SDK for Azure SQL in .NET.
.claude/skills/lingxling-azure-resource-manager-sql-dotnet/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 110% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 79% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 13% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 118% | 0% |
Management plane SDK for provisioning and managing Azure SQL resources via Azure Resource Manager.
> ⚠️ Management vs Data Plane > - This SDK (Azure.ResourceManager.Sql): Create servers, databases, elastic pools, configure firewall rules, manage failover groups > - Data Plane SDK (Microsoft.Data.SqlClient): Execute queries, stored procedures, manage connections
bashdotnet add package Azure.ResourceManager.Sql dotnet add package Azure.Identity
Current Versions: Stable v1.3.0, Preview v1.4.0-beta.3
bashAZURE_SUBSCRIPTION_ID=<your-subscription-id> # For service principal auth (optional) AZURE_TENANT_ID=<tenant-id> AZURE_CLIENT_ID=<client-id> AZURE_CLIENT_SECRET=<client-secret>
csharpusing Azure.Identity; using Azure.ResourceManager; using Azure.ResourceManager.Sql; // Always use DefaultAzureCredential var credential = new DefaultAzureCredential(); var armClient = new ArmClient(credential); // Get subscription var subscriptionId = Environment.GetEnvironmentVariable("AZURE_SUBSCRIPTION_ID"); var subscription = armClient.GetSubscriptionResource( new ResourceIdentifier($"/subscriptions/{subscriptionId}"));
ArmClient
└── SubscriptionResource
└── ResourceGroupResource
└── SqlServerResource
├── SqlDatabaseResource
├── ElasticPoolResource
│ └── ElasticPoolDatabaseResource
├── SqlFirewallRuleResource
├── FailoverGroupResource
├── ServerBlobAuditingPolicyResource
├── EncryptionProtectorResource
└── VirtualNetworkRuleResourcecsharpusing Azure.ResourceManager.Sql; using Azure.ResourceManager.Sql.Models; // Get resource group var resourceGroup = await subscription .GetResourceGroupAsync("my-resource-group"); // Define server var serverData = new SqlServerData(AzureLocation.EastUS) { AdministratorLogin = "sqladmin", AdministratorLoginPassword = "YourSecurePassword123!", Version = "12.0", MinimalTlsVersion = SqlMinimalTlsVersion.Tls1_2, PublicNetworkAccess = ServerNetworkAccessFlag.Enabled }; // Create server (long-running operation) var serverCollection = resourceGroup.Value.GetSqlServers(); var operation = await serverCollection.CreateOrUpdateAsync( WaitUntil.Completed, "my-sql-server", serverData); SqlServerResource server = operation.Value;
csharpvar databaseData = new SqlDatabaseData(AzureLocation.EastUS) { Sku = new SqlSku("S0") { Tier = "Standard" }, MaxSizeBytes = 2L * 1024 * 1024 * 1024, // 2 GB Collation = "SQL_Latin1_General_CP1_CI_AS", RequestedBackupStorageRedundancy = SqlBackupStorageRedundancy.Local }; var databaseCollection = server.GetSqlDatabases(); var dbOperation = await databaseCollection.CreateOrUpdateAsync( WaitUntil.Completed, "my-database", databaseData); SqlDatabaseResource database = dbOperation.Value;
csharpvar poolData = new ElasticPoolData(AzureLocation.EastUS) { Sku = new SqlSku("StandardPool") { Tier = "Standard", Capacity = 100 // 100 eDTUs }, PerDatabaseSettings = new ElasticPoolPerDatabaseSettings { MinCapacity = 0, MaxCapacity = 100 } }; var poolCollection = server.GetElasticPools(); var poolOperation = await poolCollection.CreateOrUpdateAsync( WaitUntil.Completed, "my-elastic-pool", poolData); ElasticPoolResource pool = poolOperation.Value;
csharpvar databaseData = new SqlDatabaseData(AzureLocation.EastUS) { ElasticPoolId = pool.Id }; await databaseCollection.CreateOrUpdateAsync( WaitUntil.Completed, "pooled-database", databaseData);
csharp// Allow Azure services var azureServicesRule = new SqlFirewallRuleData { StartIPAddress = "0.0.0.0", EndIPAddress = "0.0.0.0" }; var firewallCollection = server.GetSqlFirewallRules(); await firewallCollection.CreateOrUpdateAsync( WaitUntil.Completed, "AllowAzureServices", azureServicesRule); // Allow specific IP range var clientRule = new SqlFirewallRuleData { StartIPAddress = "203.0.113.0", EndIPAddress = "203.0.113.255" }; await firewallCollection.CreateOrUpdateAsync( WaitUntil.Completed, "AllowClientIPs", clientRule);
csharp// List all servers in subscription await foreach (var srv in subscription.GetSqlServersAsync()) { Console.WriteLine($"Server: {srv.Data.Name} in {srv.Data.Location}"); } // List databases in a server await foreach (var db in server.GetSqlDatabases()) { Console.WriteLine($"Database: {db.Data.Name}, SKU: {db.Data.Sku?.Name}"); } // List elastic pools await foreach (var ep in server.GetElasticPools()) { Console.WriteLine($"Pool: {ep.Data.Name}, DTU: {ep.Data.Sku?.Capacity}"); }
csharp// Build connection string (server FQDN is predictable) var serverFqdn = $"{server.Data.Name}.database.windows.net"; var connectionString = $"Server=tcp:{serverFqdn},1433;" + $"Initial Catalog={database.Data.Name};" + "Persist Security Info=False;" + $"User ID={server.Data.AdministratorLogin};" + "Password=<your-password>;" + "MultipleActiveResultSets=False;" + "Encrypt=True;" + "TrustServerCertificate=False;" + "Connection Timeout=30;";
| Type | Purpose | |------|---------| | ArmClient | Entry point for all ARM operations | | SqlServerResource | Represents an Azure SQL server | | SqlServerCollection | Collection for server CRUD | | SqlDatabaseResource | Represents a SQL database | | SqlDatabaseCollection | Collection for database CRUD | | ElasticPoolResource | Represents an elastic pool | | ElasticPoolCollection | Collection for elastic pool CRUD | | SqlFirewallRuleResource | Represents a firewall rule | | SqlFirewallRuleCollection | Collection for firewall rule CRUD | | SqlServerData | Server creation/update payload | | SqlDatabaseData | Database creation/update payload | | ElasticPoolData | Elastic pool creation/update payload | | SqlFirewallRuleData | Firewall rule creation/update payload | | SqlSku | SKU configuration (tier, capacity) |
| SKU Name | Tier | Description | |----------|------|-------------| | Basic | Basic | 5 DTUs, 2 GB max | | S0-S12 | Standard | 10-3000 DTUs | | P1-P15 | Premium | 125-4000 DTUs | | GP_Gen5_2 | GeneralPurpose | vCore-based, 2 vCores | | BC_Gen5_2 | BusinessCritical | vCore-based, 2 vCores | | HS_Gen5_2 | Hyperscale | vCore-based, 2 vCores |
| SKU Name | Tier | Description | |----------|------|-------------| | BasicPool | Basic | 50-1600 eDTUs | | StandardPool | Standard | 50-3000 eDTUs | | PremiumPool | Premium | 125-4000 eDTUs | | GP_Gen5_2 | GeneralPurpose | vCore-based | | BC_Gen5_2 | BusinessCritical | vCore-based |
WaitUntil.Completed for operations that must finish before proceedingWaitUntil.Started when you want to poll manually or run operations in parallelDefaultAzureCredential — never hardcode passwords in productionRequestFailedException for ARM API errorsCreateOrUpdateAsync for idempotent operationsGet* methods (e.g., server.GetSqlDatabases())csharpusing Azure; try { var operation = await serverCollection.CreateOrUpdateAsync( WaitUntil.Completed, serverName, serverData); } catch (RequestFailedException ex) when (ex.Status == 409) { Console.WriteLine("Server already exists"); } catch (RequestFailedException ex) when (ex.Status == 400) { Console.WriteLine($"Invalid request: {ex.Message}"); } catch (RequestFailedException ex) { Console.WriteLine($"ARM Error: {ex.Status} - {ex.ErrorCode}: {ex.Message}"); }
| File | When to Read | |------|--------------| | references/server-management.md | Server CRUD, admin credentials, Azure AD auth, networking | | references/database-operations.md | Database CRUD, scaling, backup, restore, copy | | references/elastic-pools.md | Pool management, adding/removing databases, scaling |
| SDK | Purpose | Install | |-----|---------|---------| | Microsoft.Data.SqlClient | Data plane (execute queries, stored procedures) | dotnet add package Microsoft.Data.SqlClient | | Azure.ResourceManager.Sql | Management plane (this SDK) | dotnet add package Azure.ResourceManager.Sql | | Microsoft.EntityFrameworkCore.SqlServer | ORM for SQL Server | dotnet add package Microsoft.EntityFrameworkCore.SqlServer |
This skill is applicable to execute the workflow or actions described in the overview.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | pass→pass | 30,238 | 12,702 | -58% | 1 | 1 | 0% | 2,414 | 4,565 | +89% | 0 | 0 | — |
case-01 | fail→pass | 12,244 | 9,978 | -19% | 1 | 1 | 0% | 2,052 | 4,306 | +110% | 0 | 0 | — |
case-02 | fail→fail | 20,911 | 16,034 | -23% | 1 | 1 | 0% | 2,247 | 5,122 | +128% | 0 | 0 | — |
case-03 | fail→pass | 11,351 | 8,516 | -25% | 1 | 1 | 0% | 2,298 | 4,112 | +79% | 0 | 0 | — |
case-04 | pass→pass | 10,525 | 7,141 | -32% | 1 | 1 | 0% | 2,058 | 3,938 | +91% | 0 | 0 | — |
case-05 | fail→pass | 20,885 | 12,213 | -42% | 1 | 1 | 0% | 3,395 | 4,869 | +43% | 0 | 0 | — |
case-06 | pass→pass | 13,841 | 11,060 | -20% | 1 | 1 | 0% | 2,293 | 4,538 | +98% | 0 | 0 | — |
case-08 | pass→pass | 13,465 | 9,859 | -27% | 1 | 1 | 0% | 2,435 | 3,953 | +62% | 0 | 0 | — |
case-09 | pass→pass | 15,276 | 9,805 | -36% | 1 | 1 | 0% | 2,305 | 3,920 | +70% | 0 | 0 | — |
case-10 | pass→pass | 8,809 | 7,718 | -12% | 1 | 1 | 0% | 1,606 | 4,130 | +157% | 0 | 0 | — |
case-11 | fail→pass | 16,540 | 4,898 | -70% | 1 | 1 | 0% | 3,204 | 3,611 | +13% | 0 | 0 | — |
case-12 | fail→pass | 13,574 | 5,346 | -61% | 1 | 1 | 0% | 1,602 | 3,488 | +118% | 0 | 0 | — |
case-13 | pass→pass | 10,780 | 7,294 | -32% | 1 | 1 | 0% | 1,554 | 4,004 | +158% | 0 | 0 | — |
case-14 | pass→pass | 10,781 | 7,733 | -28% | 1 | 1 | 0% | 1,931 | 3,790 | +96% | 0 | 0 | — |
case-15 | pass→pass | 8,892 | 6,889 | -23% | 1 | 1 | 0% | 1,459 | 3,867 | +165% | 0 | 0 | — |
case-16 | fail→pass | 9,492 | 6,782 | -29% | 1 | 1 | 0% | 1,612 | 3,602 | +123% | 0 | 0 | — |
case-17 | pass→pass | 6,947 | 4,647 | -33% | 1 | 1 | 0% | 1,132 | 3,404 | +201% | 0 | 0 | — |
case-18 | pass→pass | 6,522 | 4,279 | -34% | 1 | 1 | 0% | 1,066 | 3,177 | +198% | 0 | 0 | — |
case-19 | pass→pass | 7,612 | 5,992 | -21% | 1 | 1 | 0% | 1,499 | 3,789 | +153% | 0 | 0 | — |
case-20 | pass→pass | 29,199 | 8,043 | -72% | 1 | 1 | 0% | 1,630 | 3,558 | +118% | 0 | 0 | — |
case-21 | fail→pass | 13,580 | 8,840 | -35% | 1 | 1 | 0% | 2,547 | 4,384 | +72% | 0 | 0 | — |
case-22 | pass→pass | 12,057 | 9,060 | -25% | 1 | 1 | 0% | 1,877 | 4,036 | +115% | 0 | 0 | — |
case-23 | pass→pass | 3,943 | 3,161 | -20% | 1 | 1 | 0% | 497 | 3,032 | +510% | 0 | 0 | — |
case-24 | pass→pass | 11,639 | 14,431 | +24% | 1 | 1 | 0% | 2,152 | 4,790 | +123% | 0 | 0 | — |
case-25 | pass→pass | 16,019 | 14,788 | -8% | 1 | 1 | 0% | 2,666 | 4,684 | +76% | 0 | 0 | — |
case-26 | pass→pass | 32,756 | 14,669 | -55% | 1 | 1 | 0% | 2,314 | 4,933 | +113% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 26 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 26 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.