I need to load a single large (40GB +) XML file into a SQL Server 2012 table using SSIS. I'm having problems because SSIS seems to be trying to load the entire XML file into memory before loading records into the database, instead of reading and loading portions of the file and releasing the memory.
At the moment, what I have is a task with an XML Source, with the following properties:
- Data access mode: XML file from variable (but could have been configured as XML File Location)
- Variable name: name of the variable that specifies the name of the XML file
- XSD location: the path to the XML file's validation XSD file.
The structure of my XML file is simple. It has only the 3 hierarchical levels, as follows:
I need to insert one record per object at the last level of the XML, replicating the values of the elements above in the hierarchy. That is, I'm making the XML hierarchy a flat file.
My question is: How do I load this file with SSIS, without trying to load the whole file into memory?