tags:

views:

20

answers:

1

I know I can get the execution plan in Management Studio in XML format using "SET showplan_xml ON".

Is there a way to get the same information through .NET code?

+1  A: 

SET is just a normal sql command, so if you can send an arbitray string to the server, send "set showplan on".

tpdi