Best method to copy a file to the SQL Server machine

sqlbulkcopy sqlclr sql-server

Question

I am looking into copying a file from the client computer to the server computer. One path I've looked into was creating a CLR method which accepts a stream as input. Another suggestion I've had is to use the BCP utility, though I have been unsuccessful in finding any examples which this was done using BCP.

Is it possible to pass a blob to BCP and import to a table, or would there be more steps involved to make this work? Which method would be best for a file copy functionality?

1
0
3/27/2013 7:05:19 PM

Accepted Answer

You can BCP blobs in and out of the database. Also, I found a reference to scripts for importing and exporting files as blobs which might be helpful.

0
3/27/2013 7:53:15 PM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow