How to get full data from SQL management studio for ntext column?

I am using SQL Server 2005. In one of the tables, I have an "xmldefinition" column that is of type ntext. Now the data in this column is very huge and contains all the XML text.

eg: - <root><something1>....</something1></root>

I want to get the whole chain from the management studio and copy it to an XML file so that I can go through the whole XML file manually. But when I query this column and I copy and paste the data into another file, the content is split in the middle and does not end there.

eg: - <root><something1>........<somechar

I believe this will copy only 8196 characters from the XML data in the column. So my question is: how to get the full data for this column manually. However, I can write C # code to read this column, but I want to do it manually in a management studio. Any idea please.

+3
source share
3 answers

Why not convert the data from NText to XML in your select statement? You will then be able to open XML in a separate window in SSMS.

+4
source

The export technique shown in SQL Server Truncation and the 8192 restriction worked for me. The conclusion states:

You can export data to a flat file that will not be truncated. For this:

  • Right click database
  • Click Tasks β†’ Export Data
  • Select a data source (default values ​​must be accurate)
  • Select "Flat File Destination" for the type of Destination.
  • Select the file name to display.
  • " " " , "

. , .

+5

- XML. varchar - ( <, &lt; ..)

select object_definition(object_id('sysdatabases')) 
 as [processing-instruction(x)] FOR XML PATH 

, XML, !

+3

Source: https://habr.com/ru/post/1791175/


All Articles