http://www.perlmonks.org?node_id=126574


in reply to Perl with Sybase: sybperl or DBI/DBD::Sybase?

Sybperl has been a lifesaver. My former employer would not buy the tools needed, so I made them using Sybperl. Now I have code snippits for all kinds of tasks.

Would like to know if Sybase::DBlib will ever be removed from distribution. It would be a shame if Sybase killed DBlib completely. I find it much faster that CTlib and with only limited use of BCP in CTlib...what's the point. Much of my heavier hitting code deals with bulk-loads. Do you know if CTlib's role with BCP will expand?

Will DBI/DBD::Sybase eventually handle the intricacies in Sybperl or is this something yet to be seen? I like the idea of one API handling connectivity to multiple platforms. My current project is to connect DB2 with Sybase and it looks like it will be a combination of DBI and Sybperl. Going with straight DBI won't give me the functionality needed. I look forward to DBI as it matures.


We do appreciate what you are doing for the community.
Brad.

  • Comment on Re: Perl with Sybase: sybperl or DBI/DBD::Sybase?

Replies are listed 'Best First'.
Re: Re: Perl with Sybase: sybperl or DBI/DBD::Sybase?
by mpeppler (Vicar) on Nov 21, 2001 at 00:12 UTC
    I very much doubt that Sybase will discontinue DBlibrary anytime soon, although you need to be aware that the DB-Library API does have some limitations and can't handle some of the newer capabilities (such as wider varchars, for example.)

    What additional BCP functionality do you need in Sybase::CTlib?

    What functionality in sybperl do you use that is not present in the DBI API?

    Thanks!

    Michael

      Michael,

      As I mentioned, Sybase::BCP is one I rely on, coupled with DBlib I use it to do all my data transfers. The two are well suited since BCP is based on DBlib. My concern lies with the changes in the Sybase client i.e., how does BCP match up with the changes in datatypes? This is something we haven’t had to deal with yet. It would seem there would be some issues there. Would feel more comfortable to see CTlib have full access to the BCP API. But that seems more of a Sybase issue.
      As far as DBI is concerned, if in the future it also could have access to the BCP API. I move a lot of data. With the ability to pluggin to different DBMS’ it would be an added bonus to move data in bulk from one platform to another, using the appropriate bulkload API’s.

      Brad

        The Sybase BCP api is indeed limited with respect to certain datatypes, and cannot be used to load data to a table that does not use allpages locking.

        sybperl 2.13_10 (a test release, available from http://www.peppler.org/downloads/) includes a new Sybase::BLK module, which is based on some new blk_*() calls in the Sybase::CTlib module. I suggest that you give that a try.

        As for having bulk-loading available in DBI - it's an interesting idea, but you will almost always get much better speed by creating a load file and calling the database server's bulk-loading utility (like Sybase's bcp command) due to overhead in moving data around in perl.

        I'm looking into ways of improving that, btw, but for now the overhead of using Sybase::BCP or Sybase::BLK is significant.

        Michael