Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Prepare Azure environments for new workloads—subscriptions, networking, identity, and landing zones
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/services/functions/templates/recipes/sql/README.md
1# Azure SQL Recipe23SQL change tracking trigger with Entra ID managed identity authentication.45## Template Selection67Resource filter: `sql`8Discover templates via MCP or CDN manifest where `resource == "sql"` and `language` matches user request.910## Troubleshooting1112### SQL Trigger Not Firing1314**Cause:** Change tracking not enabled on the target table.15**Solution:** Run these T-SQL commands on your database:1617```sql18ALTER DATABASE [YourDatabase] SET CHANGE_TRACKING = ON;19ALTER TABLE [dbo].[ToDo] ENABLE CHANGE_TRACKING;20```2122### "Login failed" or "Unauthorized" Errors2324**Cause:** Missing managed identity authentication or SQL access not granted.25**Solution:** Set the SQL connection string with managed identity authentication:2627```28Server=tcp:<server>.database.windows.net,1433;Database=<database>;Authentication=Active Directory Default;Encrypt=True;TrustServerCertificate=False;29```3031For user-assigned managed identity, add `User Id=<ClientId>`:3233```34Server=tcp:<server>.database.windows.net,1433;Database=<database>;Authentication=Active Directory Default;User Id=<ClientId>;Encrypt=True;TrustServerCertificate=False;35```3637Also run post-deploy T-SQL to grant the function app data access:3839```sql40CREATE USER [<function-app-name>] FROM EXTERNAL PROVIDER;41ALTER ROLE db_datareader ADD MEMBER [<function-app-name>];42ALTER ROLE db_datawriter ADD MEMBER [<function-app-name>];43```4445See [SQL managed identity](https://learn.microsoft.com/en-us/azure/azure-functions/functions-identity-access-azure-sql-with-managed-identity) for identity-based config — refer to the **"Configure the function app"** section for connection string and identity settings.4647## Eval4849| Path | Description |50|------|-------------|51| [eval/summary.md](eval/summary.md) | Evaluation summary |52| [eval/python.md](eval/python.md) | Python evaluation results |53