Azure-Samples / Azure-Samples/functions-quickstart-dotnet-azd-sql

Error related to Table Creation : Could not find table: 'dbo.ToDo'.

Aperta
#13 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Bicep
Stelle
1
Fork
6
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.