Up Prev Next
From: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Sybase::Xfer.pm comments
Date: Oct 9 2000 9:05PM
[ Try to keep your lines less than 80 columns wide... ]
> I'm looking for comments on two modules that I've written that I'd like to share with the public. Their names are:
> 1) Sybase::Xfer.pm
> 2) Sybase::ObjectInfo.pm
> and, for that matter, a perl script,
> 3) sybxfer.pl
> They use Sybase::DBLib and nsql, which, yes, I know lags behind the current times of DBD/DBI -- but I still think they're
> worth sharing nonetheless.
Correction: DBI/DBD::Sybase will not *replace* the Sybase::*
modules. They serve a slightly different purpose.
Sybase::DBlib lages behind the times only because DB-Library is not
getting the same improvements as ClientLibrary (hence you should
really use Sybase::CTlib for new developments)
> My comments:
> * Sybase::Xfer.pm -- Cross-server joins are frowned upon in my organization so I wanted a (better) way to transfer
> data between two servers instead of bcping out and bcping in. So I wrote some perl to make two connections; one a
> bcp connection and one regular connection. I sent a 'select * from
' to the regular connection and took the
> results and sent them to the bcp connection via bcp_sendrow. Then the enhancements started to roll in: I added a
> 'where clause', then a 'delete flag', then the possiblity of sending *any* sql, then I put some callback hooks in
> to intercept the data between the 'select' and the 'send', then I added a sophisticated 'auto-delete' flag to only
> delete the rows in the target table if they exist in the 'source stream'.
> * Sybase::ObjectInfo.pm -- A simple module to query syscolumns and systypes to pull a table's column names, column types,
> column precision, column lengths, column usertype, and if nulls are permitted and return to a hash. Nothin' fancy but
> it comes in handy when you want to make intelligent decisions on the fly.
> * sybxfer.pl --- 10 line perl wrapper to Sybase::Xfer to take command line args and pass them as switches to the module.
> My questions:
> * Are these modules worthy to promote to the public space or should I just keep 'em to myself?
Based on your info I'd say that the modules could be useful. Without
seeing the code it's hard to estimate what the potential problems
could be, though.
> * Are these module names suitable to the Sybperl community?
As far as I am concerned, yes.
> * Should I post the gzipped tarball here so people can read the full POD and use the code before I upload to CPAN?
Depends how big it is - if it's less than 10k or so then I'd say post
Michael Peppler -||- Data Migrations Inc.
email@example.com -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: firstname.lastname@example.org