In addition to the graphical execution plans available in SSMS, SQL Server 2012 provides three
SET SHOWPLAN options to display the execution plan information in a text or XML format. These options are
SET SHOWPLAN_ALL, and
SET SHOWPLAN_XML. When one of these options is enabled, SQL Server returns the execution plan generated for the query, but no results are returned because the query is not executed. It’s similar to the Display Estimated Execution Plan option in SSMS.
You can turn on the textual execution plan output in a couple of ways. One way is to issue the
SET SHOWPLAN_TEXT ON,
SET SHOWPLAN_ALL ON, or
SET SHOWPLAN_XML ON command directly in the SSMS query window. These commands must be ...