# load file contents open (FILEDATA, "$sql"); while ($record = ) { print $record; } close(FILEDATA); # prepare the stored procedure if ($sth = $DBH->prepare( $record )){ # execute the stored procedure if ($sth->execute()){ print $LOG "it made it: $HoH{$filename {'full_filename'} \n"; $HoH{$filename}{'build_state'} = 'COMPILED'; } else { # update the hash, since we will not be loading this one print $LOG "couldnt excute: $HoH{$filename {'full_filename'} \n"; $HoH{$filename}{'build_state'} = 'FAILED - COULD NOT EXECUTE'; } } else { # update the hash, since we will not be loading this one print $LOG "couldnt prepare: $HoH{$filename {'full_filename'} \n"; $HoH{$filename}{'build_state'} = 'FAILED - COULD NOT PREPARE'; } # preparing sql #### #Open an Oracle session $DBH = DBI->connect( "dbi:Oracle:$sid", $usr, $pwd ) or die "Unable to connect to $sid: $DBI::errstr"; $DBH->{RaiseError} = 1; $DBH->{LongReadLen} = 5242880; $DBH->{LongTruncOk} = 0;