Monday, March 12, 2012

Save complete execution plan

i want to know how to use the complete execution plan of query file. I mean, after use the tool display execution query plan, when I try to save it, i just can save one query in a .sqlplan file, but i want to save the complete query plan, not only one query

There is no way to store that, either you can have to use the text based using SHOWPLAN setting. KBA http://msdn2.microsoft.com/en-us/library/ms190646.aspx to save it as XML.

http://msdn2.microsoft.com/en-us/library/ms190402.aspx - will get you more on How to topics.

|||i follow the instructions and now i have this problem

TITLE: Microsoft SQL Server Management Studio

Error loading execution plan XML file E:\Documents and Settings\luur4861\My Documents\SQL Server Management Studio\Projects\Master Project\executionplans1.sqlplan. (SQLEditors)

ADDITIONAL INFORMATION:

There is an error in XML document (2, 1). (System.Xml)

There is an unclosed literal string. Line 2, position 1. (System.Xml)

BUTTONS:

OK

|||
SET SHOWPLAN_XML ON;
GO

select * from dbo.isolatedleptons(24455);

select dbo.threeLeptonCut(24455);

select * from dbo.oppositeLeptons(24455);

select dbo.zVetoCut(24455);

select * from dbo.okjets(24455);

select * from dbo.bJets(24455);

select * from dbo.wJets(24455);

select * from dbo.wPairs(24455);

select * from dbo.topComb(24455);

select dbo.topcut(24455);

select * from dbo.topComb(24455);

select * from dbo.mTopComb(24455);

select * from dbo.leftjets(24455);

select dbo.jetVetoCut(24455);

select dbo.leptoncuts(24455);

select dbo.missEECuts(24455);

select * from Allcuts;

select * from optAllcuts;

select * from expcuts;

GO
SET SHOWPLAN_XML OFF;|||Sow hen you save it to XML and then try and reload you get this error? Can you look int he XML Line 2 Position 1 and see if there is a string thats not closed?

No comments:

Post a Comment