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.)
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
1 additional answer
Sort by: Most helpful
-
Seeya Xi-MSFT 16,441 Reputation points
2021-09-27T07:29:50.2+00:00 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.