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'.
diannagibbsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.