use strict; use Time::Local; use warnings; use Storable; use Data::Dumper; use DateTime; use DBI; use Digest::MD5 qw(md5 md5_hex md5_base64); use DBD::Oracle ':ora_types'; # The Connection # ## Connect to VistaMart DB my $dbh = DBI->connect("dbi:Oracle:host=$scriptProps{'IVDBHOST'};sid=$scriptProps{'IVDBSID'};port=$scriptProps{'IVDBPORT'}", $scriptProps{'IVDBUSER'}, $scriptProps{'IVDBPASSWORD'},{ AutoCommit => 1 }) or gracefulExit($DBI::errstr); $dbh->{LongReadLen} = 41943040; $dbh->{LongTruncOk} = 1; #The insert $dbh = $dbh->prepare("INSERT INTO vindbase_operator.mobily_vb_script_worklistv2 (worklistid, emstype, submitserver, submitdate, submitowner, state, contents, contentscksum) VALUES (vindbase_operator.mobily_vb_script_worklist_inc.nextval,?,?,to_date(?,'YYYY-MM-DD H H24:MI:SS'),?,?,?,?)"); $dbh->bind_param( 1, 'samsungWSM' ); $dbh->bind_param( 2, $hostname ); $dbh->bind_param( 3, getDateFromEPOC($fileList{$filename}{timestamp}) ); $dbh->bind_param( 4, $scriptName ); $dbh->bind_param( 5, 1 ); $dbh->bind_param( 6, $outFile, {ora_type => ORA_CLOB}); $dbh->bind_param( 7, md5_hex($outFile) ); $dbh->execute; #$dbh->commit; print ">>>>>>>>>>>>>>>>>FINNN\n"; #DEBUG #disconnect $dbh->disconnect;