question

sakuraime avatar image
0 Votes"
sakuraime asked SeeyaXi-msft commented

Query store export the execution plan

How to export the execution plan from Query store by tsql ? I want to export directly to a file .sqlplan, instead of saving it manually . thanks

sql-server-general
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @sakuraime ,

We have not received a response from you. Did the reply could help you? If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. By doing so, it will benefit all community members who are having this similar issue. Your contribution is highly appreciated.

Best regards,
Seeya

0 Votes 0 ·
ErlandSommarskog avatar image
0 Votes"
ErlandSommarskog answered

You can use BCP. See examples at https://www.sommarskog.se/bulkload.html#blobexport. (Those examples are not for Query Store per se, but it gives you the idea.)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

SeeyaXi-msft avatar image
0 Votes"
SeeyaXi-msft answered

Hi @sakuraime,

8 Ways to Export SQL Results To a Text File: https://www.sqlservercentral.com/articles/8-ways-to-export-sql-results-to-a-text-file
Hope this link could give you little help or idea.

Best regards,
Seeya


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.