views:

195

answers:

3

I'm writing an application that is trying to bulk export data from a SQL Server database (with a given connection string) to a local file (in whatever format).

Normally the sql server utility BCP.exe would be ideal, however, the bcp utility may not be available on the machine my app is running on. Also, bcp is not considered a redistributable app.

My question then: Is it true that BCP.exe is not redistributable? If not, then what are the best redistributable modules available to me and my app.

Any solution will be considered.

A: 

If you are using VB.Net or C# you don't need any redistributable components other than the framework.

Edit: I would like to know what system are you targeting for your application and what programming language you plan on using to produce it. So that I may give an appropriate response.

Edit again: You may want to give the SQL OPENROWSET method a try it will let you insert directly to any OLEDB provider. Other than that you'll be stuck with ADO for this.

Jeremy
A: 

Is there a specific reason why you're looking at BCP? Are you exporting very large amounts of bulk data? BCP is very fast, but it tends to work "under the covers" and thus around some of the normal checks and balances. AFAIK this is a SQL Workstation Tool (installed with SSMS etc) and not normally used from client machines.

It sounds like you are developing a "pull" based export. Another option could be to push the data from SQL Server Integration Services to each target machine (or to publish the required data and let clients subscribe to it).

Otherwise, you could write a .Net (or other) based application which makes use of ADO to pull the data down and write it out to a file.. You've got a number of options at your disposal - can you provide a bit more on what environment you are working in?

RobS
A: 

No, pull based export is what I need. It's for a lot of data. ADO is slower than bcp, otherwise I would consider it. I need the bulk data transfer capabilities that have the speed of SSIS or bcp.

You're right, bcp is a SQL Workstation Tool and never used from client machines which is my dillemma.

Jeremy, C# applications are fine.

Michael J Swart