Extracting data from SQL Server's XML execution plan
问题 My ultimate goal is automatic extraction of all referenced columns from a cached execution plan. This will help us keep a track of all the columns used by our scheduled set of SSRS reports. The XML data of interest looks like this: <ColumnReference Database="[AdventureWorksDW2012]" Schema="[dbo]" Table="[DimCustomer]" Alias="[dC]" Column="HouseOwnerFlag" /> and I would like to store Database, Schema, Table, Alias and Column values in a table. However, for a proof of concept, I have taken a