SQL SERVER – View XML Query Plans in SSMS as Graphical Execution Plan

Earlier I wrote a blog post on SQL SERVER – Parallelism – Row per Processor – Row per Thread, where I mentioned the XML Plan. As a follow up on the blog post, I received the request to send the same execution plan so that the blog readers can also use the same and reproduce it on their machine. I realized that I have actually never written on how one can send a graphical execution plan to another user so that they can reproduce the same exact details without all the actual tables, indexes and objects.

Here is very simple method on how one can do that.

Right Click on Execution Plan and click on “Save Execution Plan As…”.

You can save the plan with the extension .sqlplan. The same plan can be sent to another user via email or a USB drive. Another user can just double click on the file and open the execution plan at another local computer without physically having any underlying object.

This is very simple trick; you can also send the execution plan in text format as well. We will talk about it in some other post.

Reference: Pinal Dave (http://blog.SQLAuthority.com)

10 thoughts on “SQL SERVER – View XML Query Plans in SSMS as Graphical Execution Plan

  1. Has anyone found a good way to be able to export to one big pdf file or image file? Sometimes it is hard to see the full plan on a complicated or multi step query and it would be better to be able to view it full screen.


  2. @Pinal: Actually, another way to send a few execution plans to another person is to save a trace file, which contains the execution plans. Also, in Management Studio you can click on “Show execution plan XML…” and copy-paste it into an email.


  3. This is a great tip Pinal and I’m frequently surprised by just how often it gets overlooked by people.

    It’s especially useful in larger organisations were the roles of Developer and Database Administrator are split. This feature gives the DBA the ability to send details of an execution plan (proof perhaps of a poorly performing query for example) to the development teams for their review.

    Great post!


  4. Pingback: SQLAuthority News – A Monthly Round Up of SQLAuthority Blog Posts Journey to SQL Authority with Pinal Dave

  5. what how to save execution plan in sql server 2000 version???
    There we don’t have option “Save execution Plan as”…. it is grayed in 2000 version.


  6. Pingback: SQL SERVER – Weekly Series – Memory Lane – #036 | Journey to SQL Authority with Pinal Dave

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s