monitor
#monitor#6602

6602

Product Name

Event ID

6602

Event Source

MSSQLSERVER

Component

SQLEngine

Symbolic Name

XMLERR_PARSEERR2

Message Text

The error description is ’%.*ls’.

This error occurs when you try to execute a

stored procedure in SQL

Server in which the content of the

parameter is a complex XML document, An error

message similar to the following is reported to the user

The XML parse error 0x80004005 occurred on line number 1, near the XML text “<XML

document sample>”

Msg 6602, Level 16, State 2, Procedure sp_xml_preparedocument, Line 1

The error description is ‘Unspecified error’.

This issue occurs because of a design limitation of the MSXML parser (Msxmlsql.dll) that SQL

Server uses.

The issue is not strictly related to the size of the XML document but to its complex structure. A

combination of the XML element’s structure depth, the number and size of attributes, and the

number of entities within attributes can cause this issue. However, the level of complexity that

is required to reach this limit is found in XML documents that are several megabytes.

Expand table

sp_xml_preparedocument xmltext