XML file to SQL Server table - best way?
- From: Doug_F <DougF@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 7 Mar 2008 07:06:00 -0800
Background:
We have some systems that perform tests on piece-parts and modules to see if
they work and meet spec. The testers (boxes not people) record data during
the testing process and dump that data into an XML file stored local to the
tester.
We'd like to get the results out of the XML file and get them into a table
in SQL server. As far as I know the software on the testers does not have
the ability to directly transfer the data into SQL server.
As I look around for options, I think I see several but have no clue of the
costs or benefits to each. Here's some of what I've run across.
Option 1: Create our own system to start up the tester, watch for the
generation of the XML file and have that system push the data into SQL server
via something like ODBC (ie our custom system parses the XML file into an
'Insert...' statement and handles the data transfer. This has the advantage
that we can keep the file local to the user and get the data to the server
without exposing the user to the server. We can also do post-upload
processing and move the file into some kind of 'done' directory for long term
storage.
Option 2: Write code on the SQL server to pull the data in. I'm not clear
on what tools are available for this so pointers and tips are appreciated.
I'm assuming we'd need to move the XML file from the initial PC to a network
location the SQL server can 'see' so it can access and parse the file. We'd
need to provide the user with a way to launch the code - what types of
options are available?
Option 3: Could we take option 2 and convert that into a stored procedure
and have that executed automagically by the user? Can SQL server watch
network directories and just parse anything that shows up in the directory or
would this take other code to implement?
Option yous: If you had this problem, what would you do?
I am NOT looking for complete examples or code, just some pointers to
options and ideas. I'm new to the SQL server world and the amount of
information available is pretty large. As I look around for information on
XML, most of it seems tied to using XML on the web which is not what we're
doing - we just want to take a text file and stuff the data into something we
can ask questions to later...
Thanks for any tips.
Doug
.
- Follow-Ups:
- Re: XML file to SQL Server table - best way?
- From: Mike C#
- Re: XML file to SQL Server table - best way?
- Prev by Date: Silent performance killer with promoted column
- Next by Date: Re: XML file to SQL Server table - best way?
- Previous by thread: Silent performance killer with promoted column
- Next by thread: Re: XML file to SQL Server table - best way?
- Index(es):
Relevant Pages
|