[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.sqlserver.programming

Options for importing data into SQL 2005

Curious Joe

3/19/2007 9:45:00 PM

I have various files that I get from clients that I send through a
custom "scrubbing" program. I want to upgrade the program to import
the data straight into my sql server instead of using an interim
format (dbf/text/csv/etc). The program is written in C++ and could
easily be ported to C# to take advantage of the .Net framework if
needed.

That said, is ODBC the only way to connect to the SQL server? Are
there other options and are they any faster?

I will have the tables already created in the SQL server, I just need
to push the data into them and am trying to figure out the fastest way
to achieve that. Since the data is "prescrubbed", I won't need any
verification on the SQL server.

Thank you,

CJ

1 Answer

TheSQLGuru

3/19/2007 10:19:00 PM

0

I would think the fastest method would be to use some form of BULK insert
method, such as BCP (if you do lay the scrubbed data down to a file for
archiving or other purposes), BULKINSERT TSQL command, or perhaps a Batch
insert mechanism exposed via ADO/ADO.NET. Iterative single-row INSERTS
would be expensive from numerous points of view including logging (which can
be mostly avoided with some BULK operations and appropriate database
settings) and network activity.

--
TheSQLGuru
President
Indicium Resources, Inc.

"Curious Joe" <joebob.johnson@gmail.com> wrote in message
news:1174340695.679763.311090@e65g2000hsc.googlegroups.com...
>I have various files that I get from clients that I send through a
> custom "scrubbing" program. I want to upgrade the program to import
> the data straight into my sql server instead of using an interim
> format (dbf/text/csv/etc). The program is written in C++ and could
> easily be ported to C# to take advantage of the .Net framework if
> needed.
>
> That said, is ODBC the only way to connect to the SQL server? Are
> there other options and are they any faster?
>
> I will have the tables already created in the SQL server, I just need
> to push the data into them and am trying to figure out the fastest way
> to achieve that. Since the data is "prescrubbed", I won't need any
> verification on the SQL server.
>
> Thank you,
>
> CJ
>