About Me

My photo
I am MCSE in Data Management and Analytics with specialization in MS SQL Server and MCP in Azure. I have over 13+ years of experience in IT industry with expertise in data management, Azure Cloud, Data-Canter Migration, Infrastructure Architecture planning and Virtualization and automation. Contact me if you are looking for any sort of guidance in getting your Infrastructure provisioning automated through Terraform. I sometime write for a place to store my own experiences for future search and read by own blog but can hopefully help others along the way. Thanks.

Unable to show XML. The following error happened: Unexpected end of file has occurred. Line 24137, position 629.



when you execute below query to get system_health status and when click on RingBuffer


SELECT CAST(xet.target_data as xml) FROM sys.dm_xe_session_targets xet 
JOIN sys.dm_xe_sessions xe 
ON (xe.address = xet.event_session_address) 
WHERE xe.name = 'system_health' 





you get below error


TITLE: Microsoft SQL Server Management Studio
------------------------------

Unable to show XML. The following error happened:
Unexpected end of file has occurred. Line 24137, position 629.

One solution is to increase the number of characters retrieved from the server for XML data.
 To change this setting, on the Tools menu, click Options.

------------------------------
BUTTONS:

OK
------------------------------

In order to resolve this issue:-

On SSMS – Click on Tools > options> Query Results >> SQL Server >>General >> Results to Grid >> XML data > Unlimited.






Open a new SSMS window and execute the above query again and issue will not come.

Thanks for Reading..