sybase 15是否在Java中支持bcp api? [英] Does sybase 15 support the bcp api in java?

查看:131
本文介绍了sybase 15是否在Java中支持bcp api?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很久以前,我发现bcp只是一个小C程序,它调用sybase客户端api的特殊位来将大量数据移入数据库.它以速度为名说谎作弊,抢断和跳过检查约束. 太好了,我全力以赴. 在sybase 12中,我注意到api是在C客户端库中公开的,而不是在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.

我一直在寻找,但是我还没有发现任何表明他们已经在sybase 15 Java客户端库中实现了它的东西. 有人知道sybase 15中是否可用吗?

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?

推荐答案

我不同意您使用BCP api对Java的评论.尽管我同意Java和ODBC/JDBC的局限性,但这并不意味着使用Java BCP api没有优势.我们有一个包含大量Java的系统,并且从Java外壳程序运行BCP命令行实用程序并不实用或非常有效.

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.

运行命令行实用程序不能提供很好的错误报告和死锁重试. 它还需要将数据写入文件,这将增加操作数量并减慢整个过程.有时我们甚至不能在没有文件系统且tmp太小的网格上写文件.

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.

关于速度,JBCP比本机api慢,但是可以接受,而且肯定比调用重复的插入命令还快.

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

Mwillett(JBCP的作者)

Mwillett (author of JBCP)

这篇关于sybase 15是否在Java中支持bcp api?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆