The setting of SET SHOWPLAN_XML is set at execute or run time and not at parse time. SET SHOWPLAN_XML is intended to return output as nvarchar(max) for applications such as the sqlcmd utility, where ...