• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1479
  • Last Modified:

SQLServer Errors loading data from xml file - XML parsing error: Not enough storage is available to complete this operation.

We have tested small files loading data into SQLServer from an xml file and had no issues.  Today, we have a larger file 400m and have been getting the following errors.  I have broken the sql file down to load each of the 6 tables individually as well as running dbcc freeproccache prior but still have same error with two tables.  Any idea how to fix this error?  We have plenty of disk space and we are seeing high memory while running but does not appear to write any errors or cause any other issues.  Any direction would be appreciated.  We are on SQLServer 2008 SP2.  Any thoughts, comments appreciated!  Thanks!

Msg 6603, Level 16, State 17, Line 44
XML parsing error: Not enough storage is available to complete this operation.
The statement has been terminated.
Msg 208, Level 16, State 1, Line 63
Invalid object name 'xxx'.



Msg 6603, Level 16, State 17, Line 43
XML parsing error: Not enough storage is available to complete this operation.
The statement has been terminated.
Msg 208, Level 16, State 1, Line 62
Invalid object name 'xxx2'.
0
diannagibbs
Asked:
diannagibbs
1 Solution
 
RimvisCommented:
Hi diannagibbs,

How are you importing you XML file? Can you show you code?


BTW, have you tried bulk load?

Examples of Bulk Importing and Exporting XML Documents
http://msdn.microsoft.com/en-us/library/ms191184.aspx
0
 
diannagibbsAuthor Commented:
Yes, we are using bulk insert.  Sorry, but code is from a vendor and I can't share.  Vendor isn't familiar with the error nor is our SQLServer DBA.  I think we have a work-around by importing the failing table separately after exporting from excel.  I was hopinig it was a specific enough error and easy fix but I have found so many different resolutions by researching I'm not sure we'll figure out the root cause.
0
 
lcohanDatabase AnalystCommented:
Assuming you use:

EXEC SP_XML_PREPAREDOCUMENT @hocDoc OUTPUT, @XMLData


to do the impaort please make sure you release XML doc to avoid memeory issues by running a command like below:

EXEC SP_XML_REMOVEDOCUMENT @hocDoc

http://msdn.microsoft.com/en-us/library/ms190353.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now