7
I need to load a single large XML file (40GB+) into an 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, rather than reading and loading parts 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 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 validation XSD.
The structure of my XML file is simple. It has only the 3 hierarchical levels, the following:
- Root element with file header information (who sent the file, date etc.)
- Next level defines object collections.
- The last level has the objects individually, with a fixed set of fields.
I need to insert a record per object at the last level of XML, replicating the values of the above elements in the hierarchy. I mean, I’m turning the XML hierarchy into a flat file.
My question is: How do I load this file with SSIS, without it trying to load the entire file in memory?
How is the SSIS package structure? You are using XML data conversion/transformation tools?
– ricidleiv
@Ricidleivtondatto the structure is as simple as possible. I have a Data Flow Task which in turn has a Source XML linked to an OLE DB Destination. I was going to include a screen copy but I couldn’t. It’s just in the same description...
– Ricardo
You are using
OLEDB
orADO.NET
at Source?– ricidleiv
@Ricidleivtondatto - From what I understand, the
XML Source
has nothing to do with database but with XML files, so source does not useOLEDB
norADO.NET
. Or theADO.NET
handles XML files too? Already at destination I am usingOLEDB
.– Ricardo