Friday, March 9, 2012

Importing Data into SQL

Anyone know what's the best format for SQL to read when importing data?
XML seems to be the hottest method of late
"Melissa" <anonymous@.discussions.microsoft.com> wrote in message
news:2D2EF699-94E4-4598-A352-4D9FA2458169@.microsoft.com...
> Anyone know what's the best format for SQL to read when importing data?
|||Melissa,
it really depends. If you can onnect to another database, then importing
directly from it (linked servers/DTS) would be the preferred method,
possibly to a staging area initially in SQL Server where the data is
cleaned. If there is no OLEDB provider for the datasource, then you have to
dump out the data and then read it in. If you already understand the schema,
csv is much faster than XML. Loading in data to the DOM is slow, and XML
files are typically much larger than CSV files due to duplication of field
names. On the other hand, there is now a bulk load interfact to XML files
which speed things up, and having schema information for an XML file can
help determine the datatypes, constraints etc needed in SQL.
HTH,
Paul Ibison

No comments:

Post a Comment