HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

SQL Server execution XML plan cut off in length

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
sqllengthcutoffxmlplanserverexecution

Problem

I am running the following standard query to retrieve the XML execution plan for queries that I ran on my SQL Server via command line.

SELECT pl.query_plan FROM sys.dm_exec_cached_plans ep CROSS APPLY sys.dm_exec_query_plan(ep.plan_handle) pl;

However, it seems that for all the query plans, they are cut off partially. It's as if each row of the result is displaying only a certain number of characters. Is there some setting I need to enable to be able to see the full XML in each row?

Solution

If you are using SSMS, it limits the Grid result set size for both XML and non-XML. You can change the setting here.

Context

StackExchange Database Administrators Q#313192, answer score: 4

Revisions (0)

No revisions yet.