RE: Perl script excessively executing statement

2020-02-18 Thread JohnD Blackburn
; dbi-users@perl.org Subject: RE: Perl script excessively executing statement CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. John, The part of the story that troubles me

RE: Perl script excessively executing statement

2020-02-18 Thread Fennell, Brian
JohnD Blackburn Sent: Tuesday, 18 February 2020 8:51 AM To: Steven Lembark ; dbi-users@perl.org Subject: RE: Perl script excessively executing statement The problem is not about how well the SQL runs. It runs in less than a second, and it should only be getting executed 12 times an hour. What

Re: Perl script excessively executing statement

2020-02-18 Thread Martin J. Evans
On 18/02/2020 07:57, JohnD Blackburn wrote: After reviewing the log4perl output from DBIx when running this script I found the following perl module being executed: /usr/local/lib64/perl5/DBD/Oracle.pm Which contains the following subroutine: sub execute_for_fetch { my ($sth,

RE: Perl script excessively executing statement

2020-02-17 Thread JohnD Blackburn
even Lembark ; dbi-users@perl.org Subject: RE: Perl script excessively executing statement The problem is not about how well the SQL runs. It runs in less than a second, and it should only be getting executed 12 times an hour. What I'm trying to do is to figure out how the SQL statement got execu

Re: Perl script excessively executing statement

2020-02-17 Thread Christopher Jones
://metacpan.org/pod/DBD::Oracle#Placeholders They are also important for reducing SQL Injection attacks. Chris -Original Message- From: Steven Lembark Sent: Tuesday, 18 February 2020 3:47 AM To: dbi-users@perl.org Cc: lemb...@wrkhors.com Subject: Re: Perl script excessively executing

RE: Perl script excessively executing statement

2020-02-17 Thread JohnD Blackburn
(or there is some other problem deeper down in the stack) Cheers, John -Original Message- From: Steven Lembark Sent: Tuesday, 18 February 2020 3:47 AM To: dbi-users@perl.org Cc: lemb...@wrkhors.com Subject: Re: Perl script excessively executing statement CAUTION: This email

Re: Perl script excessively executing statement

2020-02-17 Thread Steven Lembark
On Thu, 13 Feb 2020 06:58:37 + JohnD Blackburn wrote: > The DBA pulled info from some cache that showed the SQL statement > from the script was executed 12610 times. > > So if I were to add an “or die $!” statement after the > fetchrow_array(), that might fix things? (or prevent it from

RE: Perl script excessively executing statement

2020-02-16 Thread JohnD Blackburn
, John -Original Message- From: Fennell, Brian Sent: Saturday, 15 February 2020 5:47 AM To: JohnD Blackburn ; dbi-users@perl.org Subject: RE: Perl script excessively executing statement CAUTION: This email originated from outside of the organization. Do not click links

RE: Perl script excessively executing statement

2020-02-14 Thread Fennell, Brian
easier (or not) you can get a free jvm here: https://sdkman.io/ From: JohnD Blackburn Sent: Wednesday, February 12, 2020 12:56 AM To: dbi-users@perl.org Subject: [EXTERNAL] Perl script excessively executing statement Hi all, I have a perl script in my monitoring system that has been working

Re: Perl script excessively executing statement

2020-02-13 Thread Christopher Jones
will come from the execute() - bogus syntax, wrong columns, DB space errors etc. Chris *From:* Christopher Jones *Sent:* Thursday, 13 February 2020 12:56 PM *To:* dbi-users@perl.org; JohnD Blackburn *Subject:* Re: Perl script excessively executing statement *CAUTION:*This email originated from

Re: Perl script excessively executing statement

2020-02-13 Thread Bruce Johnson
On Feb 13, 2020, at 8:30 AM, Fennell, Brian mailto:fenne...@radial.com>> wrote: Try to figure out how you can do the whole thing in a single SQL statement, then just process the results one row at time. Well, based on his example code that’s exactly what he was doing. The only loop was

RE: Perl script excessively executing statement

2020-02-13 Thread Fennell, Brian
, February 13, 2020 1:59 AM To: Christopher Jones ; dbi-users@perl.org Subject: [EXTERNAL] RE: Perl script excessively executing statement The DBA pulled info from some cache that showed the SQL statement from the script was executed 12610 times. So if I were to add an “or die $!” statement after

AW: Perl script excessively executing statement

2020-02-13 Thread Andreas Mock
. And if you really need to catch an db related exception Try::Tiny is your friend. Best regards Andreas Von: JohnD Blackburn Gesendet: Donnerstag, 13. Februar 2020 07:59 An: Christopher Jones ; dbi-users@perl.org Betreff: RE: Perl script excessively executing statement The DBA pulled info

RE: Perl script excessively executing statement

2020-02-12 Thread JohnD Blackburn
the execute statement? From: Christopher Jones Sent: Thursday, 13 February 2020 12:56 PM To: dbi-users@perl.org; JohnD Blackburn Subject: Re: Perl script excessively executing statement CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless

Re: Perl script excessively executing statement

2020-02-12 Thread Christopher Jones
*Cc:* dbi-users@perl.org *Subject:* Re: Perl script excessively executing statement *CAUTION:*This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe. I don't work with Oracle, but

RE: Perl script excessively executing statement

2020-02-12 Thread JohnD Blackburn
, I don’t know how to reproduce it to test if any mitigations are sufficient. Cheers, John From: Geoffrey Rommel Sent: Thursday, 13 February 2020 2:56 AM To: JohnD Blackburn Cc: dbi-users@perl.org Subject: Re: Perl script excessively executing statement CAUTION: This email originated from

Re: Perl script excessively executing statement

2020-02-12 Thread Geoffrey Rommel
I don't work with Oracle, but here's a guess. Maybe the database was unresponsive before your script started running, not as a result of it. If so, maybe your script tried to prepare the statement, failed, and retried 12000 times. Eventually the DBA noticed the problem and restarted the database,

Perl script excessively executing statement

2020-02-11 Thread JohnD Blackburn
Hi all, I have a perl script in my monitoring system that has been working for months without an issue. Basically, it connects to an Oracle 12c database, prepares a statement, then it executes the statement, then it has a while loop to process the returned rows. So under normal conditions the