Sylvain
Sylvain

Reputation: 19259

How to get the SQL statement behind the Query Store results (sys.query_store_*)

This question is about querying the sys.query_store_* tables. The SQL Server interface lets you build reports for "Top Resources Consuming Queries" (part of the Query Store feature).

I created a report that I like. Now, how can I view the underlying SQL statement(s) to produce this data. I want to build my own automated report based on that and I'd like to use this view's statement as a starting point.

Upvotes: 0

Views: 200

Answers (1)

David Browne - Microsoft
David Browne - Microsoft

Reputation: 89091

Use Sql Profiler while you are running the report to capture the SQL Statements.

Upvotes: 1

Related Questions