Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does sybase 15 support the bcp api in java?

A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database. It lies cheats and steals and skips check constraints all in the name of speed. Great, I'm all for it. In sybase 12 I noticed that the api was exposed in the C client library, but not the java one.

I've been looking but I haven't found anything that says they've yet implemented it in the sybase 15 java client library. Does anybody know if this is available or not in sybase 15?

like image 541
stu Avatar asked Oct 04 '10 21:10

stu


1 Answers

I disagree with your comments on Java using a BCP api. Whilst I agree about the limitations of Java and ODBC/JDBC that doesn't mean there aren't advantages of using a Java BCP api. We have a system with a lot of Java and its not practical or very effective to shell out from Java and run the BCP command line utility.

Running the command line utility doesn't give very good error reporting and deadlock retries. It also requires the writing of data to a file which is going to increase the number of operations and slow down the whole process. Sometime we can't even write a file as its on a grid which doesn't have a file system and tmp is too small.

As for the speed, well JBCP is slower than native api, however it is acceptable and certainly faster than calling repeated insert commands.

Mwillett (author of JBCP)

like image 136
mwilett Avatar answered Sep 28 '22 00:09

mwilett