Hi,
I have a program developed with a tool that generates cursors everywhere. If I run a query to get the most expensive queries regarding logical reads, for example, I've got something like this:
(No column name) execution_count total_logical_reads last_logical_reads
FETCH API_CURSOR00000000002E4433 5940 165362023 78609
FETCH API_CURSOR00000000002CD9D7 1121 50132767 24219
FETCH API_CURSOR00000000002F1E84 733 25853048 49040
How can I get the query text of the cursor? Is there any way to identify what those cursors are? Ideally, with some dmvs, I know that with extended events I can probably get them but I wonder if there is another way.
Thanks in advance.