Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

XML Showplan Expand / Collapse
Author
Message
Posted Friday, June 27, 2008 12:20 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, October 26, 2014 8:48 PM
Points: 87, Visits: 265
When I save the xml execution plan to a file, the data is truncated to the maximum column size 8,192, which results in a invalid formatted xml file.

How can I save the complete xml?

Thank you,

Ben Lopez
Post #525264
Posted Friday, June 27, 2008 8:57 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 24, 2014 11:52 AM
Points: 9,294, Visits: 9,484
Can you post the Query that it is based on?

-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #525416
Posted Sunday, June 29, 2008 10:13 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 6:05 AM
Points: 40,258, Visits: 36,681
How are you displaying it and saving it?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #525617
Posted Sunday, June 29, 2008 3:39 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, October 26, 2014 8:48 PM
Points: 87, Visits: 265
in SSMS, I have the results going to a text file.
I bracket my query with the set showplan_xml on, and off
When I hit the F5, it asks me to name the output file and everything is ok. However, when I look in the text file the xml is incomplete.

Mind you, when I output the results to a grid and click on the xml output, it opens a new window that shows the complete xml. This result can be saved to a file, either with the .sqlplan or .xml type. I'm able to click on the .sqlplan file, and it opens nicely in SSMS.

My ultimate goal is to create and save the xml plan for many queries into a single text file. How do you do this?

Thanks

Ben Lopez
Post #525664
Posted Monday, June 30, 2008 12:01 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 6:05 AM
Points: 40,258, Visits: 36,681
Hmmm, not sure if you can. From what I know of xml, each plan will have to be in a separate file to be valid xml and to be readable.

Honestly, I've always either saved the xml to a file from the grid, or done a save-as on an execution plan.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #525738
Posted Monday, June 30, 2008 8:12 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Sunday, October 26, 2014 8:48 PM
Points: 87, Visits: 265
ok..Gail, really, thanks..

but, the restriction that all xml output should go to a single file is really not that important because even if I create many files, I could write a .bat file that combines them into a single file.

Where I see the problem is that the user has to click on the results to open the xml tab.

Is there a SS Managment Studio (workbench) feature that would let me save the output automatically?

Thanks, again...

Ben Lopez

Post #526295
Posted Tuesday, July 1, 2008 6:23 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Friday, October 24, 2014 11:52 AM
Points: 9,294, Visits: 9,484
Benny Lopez (6/30/2008)
Is there a SS Managment Studio (workbench) feature that would let me save the output automatically?


Well you can set your results output to "Save to file..", but I doubt that is sufficient for you.

Maybe there is a way to use the profiler to do this? Hmmm...


-- RBarryYoung, (302)375-0451 blog: MovingSQL.com, Twitter: @RBarryYoung
Proactive Performance Solutions, Inc.
"Performance is our middle name."
Post #526529
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse