July 19, 2011 at 8:39 am
Hi all,
When trying to populate an XML field from a large file, I received the following error (6969):
ID/IDREF validation consumed too much memory. Try reducing the number of ID and IDREF attributes. Rearranging the file so that elements with IDREF attributes appear after the elements which they reference may also be helpful.
A quick Google of the above phrase brought this link, which explains that MS have imposed a 1MB memory limit on the process of ID/IDREF validation in order to prevent denial-of-service attacks from hackers. That's all well and good, but does anyone know how I can override this for my own use? I have full administrative rights over the server (Windows 2008, running SQL 2008 standard release, not R2) and can edit the registry if need be.
I have lots of files that are large enough to cause this error, and editing them is not an option for me, so if anyone can help I'd be extremely grateful!
Regards,
Ed Graham
July 24, 2011 at 11:18 am
Do you actually use the XML datatype within SQL Server for anything other than the storage of XML data?
What I am getting at is if all you want to do is store the XML and retrieve the XML but never interrogate the XML then you could store it in a VARCHAR(MAX) field. This also gives the ability to compress the data using PAGE or ROW compression
July 25, 2011 at 5:09 am
Thanks for the reply, David. I do actually validate the XML stored in the database: the XML column has an associated schema. However, I have since modified the schema to turn off the ID/IDREF checking, which has now solved (or I should probably say "avoided") the problem.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply