Up Prev Next
From: Stephen dot Sprague at msdw dot com
Subject: Sybase::Xfer.pm comments
Date: Oct 9 2000 8:52PM
I'm looking for comments on two modules that I've written that I'd like to share with the public. Their names are:
and, for that matter, a perl script,
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.
* 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.
* Are these modules worthy to promote to the public space or should I just keep 'em to myself?
* Are these module names suitable to the Sybperl community?
* Or, are there modules that do these tasks already and I've just had my head buried in sand for too long?
* Should I post the gzipped tarball here so people can read the full POD and use the code before I upload to CPAN?
Any feedback greatly appreciated.