Bsm30 has asked for the wisdom of the Perl Monks concerning the following question:
What I have so far is...db2 "LOAD from $INPUT_DIR/product.input \ OF DEL \ MODIFIED BY TIMESTAMPFORMAT=\"YYYY-MM-DD-HH:MM:SS.UUUUUU\" \ SAVECOUNT 1000 \ MESSAGES $OUTPUT_DIR/product.msg \ REPLACE INTO DB2INST1.PRODUCT \ COPY YES TO /dev/null \ WITHOUT PROMPTING \ DATA BUFFER 2000" >> $SQL_LOG db2 "SET INTEGRITY FOR DB2INST1.PRODUCT IMMEDIATE CHECKED" >> $SQL_LO +G
It doesn work....use DBI; use Tie::File; use File::Copy; my $database='DBI:DB2:game'; my $user='db2admin'; my $password='db2admin'; my $dbh = DBI->connect($database,$user,$password) or die "Can't connec +t to $database: $DBI::errstr"; my $sth = $dbh->prepare( q{ load from product.input of DEL modified by timestampformat="YYY +Y-MM-DD-HH:MM:SS.uuuuuu" savecount 1000 messages rob.msg replace into db2inst1.product copy + yes to d:\data\perl without prompting}) or die "Can't prepare statement: $DBI::errstr"; my $rc = $sth->execute or die "Can't execute statement: $DBI::errstr";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to load a DB2 database using PERL
by theguvnor (Chaplain) on Apr 15, 2004 at 19:37 UTC | |
by Beechbone (Friar) on Apr 16, 2004 at 20:53 UTC | |
by dazzle (Sexton) on Jul 13, 2005 at 19:18 UTC | |
Re: How to load a DB2 database using PERL
by runrig (Abbot) on Apr 15, 2004 at 19:12 UTC | |
Re: How to load a DB2 database using PERL
by JSchmitz (Canon) on Apr 15, 2004 at 19:21 UTC | |
Re: How to load a DB2 database using PEARL
by Beechbone (Friar) on Apr 16, 2004 at 21:26 UTC |