Azure-Samples / Azure-Samples/functions-quickstart-dotnet-azd-sql
Error related to Table Creation : Could not find table: 'dbo.ToDo'.
- Dominant language
- Bicep
- Stars
- 1
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
Provisioning and deployment happens just fine. I can see in the logs that the function is getting triggered. However, I noticed no table exists in the database when I checked it using the online query editor, and then, using the mssql extension on VS Code.
When I run the code locally, I get a more specific error.
```
[2025-11-26T15:32:47.647Z] Host lock lease acquired by instance ID '000000000000000000000000928942B5'.
[2025-11-26T15:32:49.098Z] Failed to start SQL trigger listener for table: 'dbo.ToDo', function ID: '5a30d5d2d2bc604e'. Exception: System.InvalidOperationException: Could not find table: 'dbo.ToDo'.
[2025-11-26T15:32:49.103Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerUtils.GetUserTableIdAsync(SqlConnection connection, SqlObject userTable, ILogger logger, CancellationToken cancellationToken)
[2025-11-26T15:32:49.106Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerListener`1.StartAsync(CancellationToken cancellationToken)
[2025-11-26T15:32:49.132Z] The listener for function 'Functions.sql_trigger_todo' was unable to start.
[2025-11-26T15:32:49.136Z] The listener for function 'Functions.sql_trigger_todo' was unable to start. Microsoft.Azure.WebJobs.Extensions.Sql: Could not find table: 'dbo.ToDo'.
[2025-11-26T15:32:51.398Z] Failed to start SQL trigger listener for table: 'dbo.ToDo', function ID: '5a30d5d2d2bc604e'. Exception: System.InvalidOperationException: Could not find table: 'dbo.ToDo'.
[2025-11-26T15:32:51.402Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerUtils.GetUserTableIdAsync(SqlConnection connection, SqlObject userTable, ILogger logger, CancellationToken cancellationToken)
[2025-11-26T15:32:51.408Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerListener`1.StartAsync(CancellationToken cancellationToken)
[2025-11-26T15:32:51.414Z] The listener for function 'Functions.sql_trigger_todo' was unable to start.
[2025-11-26T15:32:51.419Z] The listener for function 'Functions.sql_trigger_todo' was unable to start. Microsoft.Azure.WebJobs.Extensions.Sql: Could not find table: 'dbo.ToDo'.
[2025-11-26T15:32:56.041Z] Failed to start SQL trigger listener for table: 'dbo.ToDo', function ID: '5a30d5d2d2bc604e'. Exception: System.InvalidOperationException: Could not find table: 'dbo.ToDo'.
[2025-11-26T15:32:56.047Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerUtils.GetUserTableIdAsync(SqlConnection connection, SqlObject userTable, ILogger logger, CancellationToken cancellationToken)
[2025-11-26T15:32:56.049Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerListener`1.StartAsync(CancellationToken cancellationToken)
[2025-11-26T15:32:56.053Z] The listener for function 'Functions.sql_trigger_todo' was unable to start.
[2025-11-26T15:32:56.055Z] The listener for function 'Functions.sql_trigger_todo' was unable to start. Microsoft.Azure.WebJobs.Extensions.Sql: Could not find table: 'dbo.ToDo'.
[2025-11-26T15:33:01.947Z] Failed to start SQL trigger listener for table: 'dbo.ToDo', function ID: '5a30d5d2d2bc604e'. Exception: System.InvalidOperationException: Could not find table: 'dbo.ToDo'.
[2025-11-26T15:33:01.949Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerUtils.GetUserTableIdAsync(SqlConnection connection, SqlObject userTable, ILogger logger, CancellationToken cancellationToken)
[2025-11-26T15:33:01.953Z] at Microsoft.Azure.WebJobs.Extensions.Sql.SqlTriggerListener`1.StartAsync(CancellationToken cancellationToken)
[2025-11-26T15:33:01.955Z] The listener for function 'Functions.sql_trigger_todo' was unable to start.
[2025-11-26T15:33:01.959Z] The listener for function 'Functions.sql_trigger_todo' was unable to start. Microsoft.Azure.WebJobs.Extensions.Sql: Could not find table: 'dbo.ToDo'.
```
The deployed function seems to running fine and does not show any error in the Application Insights. It does not complain about any missing tables and such.
Please advice.
Jay (Vijayasimha BR)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.