This code not import the whole xml file contents, but only a part.
bcp s1.dbo.table_test in myfile.xml -c -T -S localhost\sqlexpress
My file is a large file, around 100 MB and my table has the xml column
How to solve this? Thank you
As pointed out in the comments, I assume, that your XML was read completely. Storing data within an XML column is impossible, if the XML is not valid...
You might try:
SELECT DATALENGTH(YourXMLColumn) FROM YourTable
and see the used bytes (attention: its unicode
, two bytes per char).
Or Try
SELECT LEN(CAST(YourXML AS VARCHAR(MAX))) FROM YourTable
returns the count of characters
Or
Hope this helps