SSMS : Unable to show XML in the SSMS Explorer
Asked Answered
G

1

6

We are getting below error msg in the pop-up windows, when trying to view the generated XML in SSMS - Sql Server.

SSMS XML -  Error Msg.

Microsoft SQL Server Management Studio

Unable to show XML. The following error happened: Unexpected end of file while parsing Name has occurred. Line 1, position 2097154.

Guddle answered 5/7, 2018 at 8:4 Comment(9)
Have you tried doing what it has suggested? Also, Line 1 position 2097154?? Does your first line of XML really have over 2 million characters?Inerney
Do you have an enclosing tag at the end of the file? Is it well formatted?Bork
The data is not that long. In fact, if the record set is low ( like 20 ), there is no issue.Guddle
If there was "no issue" you wouldn't be getting the error you're getting.Inerney
Can you view the contents by other methods? Perhaps SqlCmd or Results to Text?Teheran
@Larnu A 2MB XML file is nothing special, and having everything on the same line is nothing special, either (it actually saves some space).Madeline
@Guddle If you open the file in Internet Explorer, what happens?Madeline
@Madeline you realise it isn't a file, right? It's a column, in SQL Server, of the data type xml. The OP won't be able to "open the file" in Internet Explorer; it's noy a file.Inerney
No, I didn't realize. Where does it say that? I read "generated XML", that could be anything.Madeline
O
2

You will not be able to fix this beyond what SSMS can support when it comes to viewing the XML data in SSMS. I would suggest any of the following resolutions:

  • Change the parameters of what is pushing that XML data into your server so that the overall size can be limited. For example, if this XML data contains all values for a data point for the past year, perhaps break it up into quarters instead and push them separately into the server.
  • Export the data instead of trying to view it in SSMS.
Olli answered 20/6, 2019 at 17:40 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.