Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Prepare applications for Azure deployment by generating infrastructure code, Dockerfiles, and config files.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/services/sql-database/README.md
1# Azure SQL Database23Managed relational database with ACID compliance and full SQL Server compatibility.45## When to Use67- Relational data with ACID requirements8- Complex queries and joins9- Existing SQL Server workloads10- Reporting and analytics11- Strong schema enforcement1213## Authentication1415**Default:** Entra-only authentication (recommended)16- Required for subscriptions with Entra-only policies17- More secure than SQL authentication18- Eliminates password management1920## Required Supporting Resources2122| Resource | Purpose |23|----------|---------|24| Key Vault | Store connection strings |25| Private Endpoint | Secure access (optional) |2627## SKU Selection2829| Tier | Use Case | Features |30|------|----------|----------|31| **Basic** | Dev/test, light workloads | 5 DTUs, 2GB |32| **Standard** | Production workloads | 10-3000 DTUs |33| **Premium** | High-performance | In-memory OLTP |34| **Serverless** | Variable workloads | Auto-pause, auto-scale |35| **Hyperscale** | Large databases | 100TB+, instant backup |3637## Environment Variables3839| Variable | Value | When to Set |40|----------|-------|-------------|41| `AZURE_PRINCIPAL_ID` | Current user's object ID | After `azd init`, before `azd provision` |42| `AZURE_PRINCIPAL_NAME` | Current user's display name | After `azd init`, before `azd provision` |43| `SQL_SERVER` | `{server}.database.windows.net` | Runtime (from Bicep outputs) |44| `SQL_DATABASE` | Database name | Runtime (from Bicep outputs) |45| `SQL_CONNECTION_STRING` | Full connection string (Key Vault) | Runtime (from Bicep outputs) |4647**Set principal variables:**48```bash49PRINCIPAL_INFO=$(az ad signed-in-user show --query "{id:id, name:displayName}" -o json)50azd env set AZURE_PRINCIPAL_ID $(echo $PRINCIPAL_INFO | jq -r '.id')51azd env set AZURE_PRINCIPAL_NAME $(echo $PRINCIPAL_INFO | jq -r '.name')52```5354## References5556- [Bicep Patterns](bicep.md)57- [Entra ID Auth](auth.md)58- [SDK Patterns](sdk.md)59