|
|
sybperl-l Archive
Up Prev Next
From: Stephen dot Sprague at morganstanley dot com
Subject: CPAN Upload: S/SP/SPRAGST/Sybase-Xfer-0.51.tar.gz (fwd)
Date: Jul 1 2001 6:09PM
re: Sybase::Xfer.pm, version 0.51
Another version for intrepid Sybase users (I being one too!) Here's the
README.
QUICK DESCRIPTION
Bulk copies data into a Sybase table. Data sources can include a)
another Sybase table, b) the results of any sql, c) the return values
from a perl subroutine called repetitively, or d) a flat file. Comes
with robust error reporting, handling, and intercepting and perl call
back hooks to intercept data before and after they're sent to the
server.
Also comes with a command line wrapper, sybxfer.
SYNOPSIS
#!/usr/bin/perl
use Sybase::Xfer;
my %switches = (-from_server=>'CIA', -to_server=>'NSA', -table => 'x-files');
my $h = Sybase::Xfer->new( %switches );
my %status = $h->xfer(-return=>"HASH");
print "xref failed. $status{last_error_msg}\n" unless $status{ok};
#!/bin/ksh
sybxfer -from_server 'CIA' -to_server 'NSA' -table 'x-files'
if [[ $? != 0 ]]; then print "transfer problems"; fi
CHANGE LOG:
------------------------
Version 0.51 15-jun-2001
------------------------
* added -to_database documentation (Suresh Balakrishnan)
* added use 5.005. (Merijn Broeren)
* added new option -timeout [secs] (Ron Isaacson)
* added new option,
-drop_and_recreate_indices | dari [syts:server.database]
instructs xfer to drop the indices on the target table
before the transfer begins and to recreate them after
the transfer is complete.
* defined scalar return context of method xfer as follows:
0 = success w/o any hitches
>0 = success w/ n number of rows not transferred
-1 = aborted. unrecoverable error
-2 = aborted. interrupt signal
-3 = aborted. timeout signal
* added above scalar return code as 4th element to
list return context. ie. array is as follows:
[0] = num rows read from source
[1] = num rows transferred to target
[2] = last known error message
[3] = scalar return code
* new switch added. -return=> 'HASH' | 'ARRAY' | 'SCALAR'
default is SCALAR if called in scalar context and
ARRAY if called in list context. This is backward
compatible default behavior. However, if HASH is specified
the method will now return:
{rows_read} = number of rows read from target
{rows_transferred} = number of rows transferred to target
{last_error_msg} = last error message encountered
{scalar_return} = scalar return. see above.
{ok} = 1 if all rows were transferred regardless
of retries or warnings along the way.
= 0 if not
* added 'Xfer info' portion to std out. This echoes
-from_table, -to_table and logs pre-xfer activities
like deleting rows, truncating table, dropping indices
etc.
* can now specify -to_table as:
[source.][server.][database.][owner.][table]
where source = 'Sybase' is the only supported source right
now. -to_table settings override -to_server, -to_database
settings.
* fixed double mapping bug when using -from_file_map. Also,
can now use -from_file_map with any source.
* fixed bug with -retry_verbose (Ilya Shulimovich)
* fixed bug when using -from_file and
file had trailing null fields. (Thomas Boccafola)
* rigorous deadlock testing performed by Ilya Shulimovich (i think)
* huge thanks to Ron Isaacson for enlightening me on many
various perl oddities and for volunteering to help me
with more releases of this module. Hell, he's even starting
in own xfer module that'll stretch past this one.
* documentation on error handling expanded.
* added documentation in the bugs section that -to_tables
residing on Sybase Openserver's are not supported for the
target table.
(Peter Somu)
---------- Forwarded message ----------
Date: Sun, 1 Jul 2001 20:01:44 +0200
From: PAUSE
Reply-To: cpan-testers@perl.org
To: Stephen J. Sprague , cpan-testers@perl.org
Subject: CPAN Upload: S/SP/SPRAGST/Sybase-Xfer-0.51.tar.gz
The uploaded file
Sybase-Xfer-0.51.tar.gz
has entered CPAN as
file: $CPAN/authors/id/S/SP/SPRAGST/Sybase-Xfer-0.51.tar.gz
size: 41189 bytes
md5: 23bf437291606dd1ae70a5076e84fd83
No action is required on your part
Request entered by: SPRAGST (Stephen J. Sprague)
Request entered on: Sun, 01 Jul 2001 18:00:28 GMT
Request completed: Sun, 01 Jul 2001 18:01:43 GMT
Virtually Yours,
Id: paused,v 1.74 2001/05/20 14:59:52 k Exp k
|