Did you check DOCS to make sure there is no workaround?
yes
Describe the bug
On SQL Server express with service broker based data collection, the query plans for long running queries (and I believe others) are not being populated
To Reproduce
Steps to reproduce the behavior:
Install SQL Express
Install SQLWatch via dbatools method
Enable queues using [dbo.usp_sqlwatch_internal_migrate_jobs_to_queues]
Execute long running query
Check sqlwatch_meta_query_plan table
Additional context
When using agent jobs, the SQLWATCH-INTERNAL-CONFIG job executes the [usp_sqlwatch_internal_add_procedure] to populate the [sqlwatch_meta_procedure] table with a list of stored procedures. This table is crucial to the logging of query plans via procedure [usp_sqlwatch_logger_xes_long_queries] as it calls [usp_sqlwatch_internal_get_query_plans] which performs a inner join to the procedures table. This will filter out any plan details that would be logged if that procedure does not exist in the table. When using the service broker based approached to replace jobs, when the queue is activated, it calls the procedure [usp_sqlwatch_internal_exec_activated] which executes the collection procedures in a similar way as the agent jobs but the execution of the [usp_sqlwatch_internal_add_procedure] is missing. I plan to submit a pull request to add this in.
Did you check DOCS to make sure there is no workaround? yes
Describe the bug On SQL Server express with service broker based data collection, the query plans for long running queries (and I believe others) are not being populated
To Reproduce Steps to reproduce the behavior:
Additional context When using agent jobs, the SQLWATCH-INTERNAL-CONFIG job executes the [usp_sqlwatch_internal_add_procedure] to populate the [sqlwatch_meta_procedure] table with a list of stored procedures. This table is crucial to the logging of query plans via procedure [usp_sqlwatch_logger_xes_long_queries] as it calls [usp_sqlwatch_internal_get_query_plans] which performs a inner join to the procedures table. This will filter out any plan details that would be logged if that procedure does not exist in the table. When using the service broker based approached to replace jobs, when the queue is activated, it calls the procedure [usp_sqlwatch_internal_exec_activated] which executes the collection procedures in a similar way as the agent jobs but the execution of the [usp_sqlwatch_internal_add_procedure] is missing. I plan to submit a pull request to add this in.