Since SQL server2005, a new data type XML type is provided, which allows you to directly store data in a data table in the format of an XML file. In combination with the use of LINQ to SQL in ASP. NET, we can easily store XML files in the SQL Server database. However, by default, if the XML file you store is large (more than 2 MB), you cannot directly click View XML content in the SQL Server Manager to report the following error message:
How can this problem be solved? The error message is clearly described. in SQL Server Management studio, click the Tools menu and select options. Find the corresponding setting node and change the maximum character limit of XML data to unlimited (unlimited.
By default, to improve query efficiency, SQL Server Returns a maximum of 2 MB of XML data in management studio, if the content of the XML file you store is greater than 2 MB, the remaining characters are automatically truncated, causing an error when opening the file.