RE: Recurse gives me No more handles

2009-01-20 Thread Curtis Leach
That also means that you can reuse that statement handle & only do one prepare if you use placeholders. Since only one execute would be processed at a time. This would also slightly speed up your processing. Curtis -Original Message- From: Martin J. Evans [mailto:martin.ev...@easysoft

Re: Recurse gives me No more handles

2009-01-20 Thread Martin J. Evans
don.walt...@falconjet.com wrote: Is your dataset too large to hold in memory? Another approach would be load each result set into memory. I'm not sure I understand your suggestion. Whether I'm storing the results in memory or not, I still have to loop through the subroutine, h

Re: Recurse gives me No more handles

2009-01-20 Thread Martin J. Evans
don.walt...@falconjet.com wrote: Just a quick thought. Instead of looping through the selected rows one at a time, if the result-set is small(ish) it would probably work if you selected all the rows (fetchall_arrayref) then looped through them. You will use more memory but les

RE: Recurse gives me No more handles

2009-01-20 Thread Don.Walters
> Is your dataset too large to hold in memory? Another approach would be > load each result set into memory. I'm not sure I understand your suggestion. Whether I'm storing the results in memory or not, I still have to loop through the subroutine, having it call itself each time and thereby usi

RE: Recurse gives me No more handles

2009-01-20 Thread Don.Walters
> Just a quick thought. Instead of looping through the selected rows one > at a time, if the result-set is small(ish) it would probably work if you > selected all the rows (fetchall_arrayref) then looped through them. You > will use more memory but less handles. > > Martin Well, this solution di

Re: Recurse gives me No more handles

2009-01-20 Thread Douglas Wilson
On Tue, Jan 20, 2009 at 9:39 AM, wrote: > I am running DB2 v9 on AIX 5.3.0.0 with perl 5.8.2 and I'm having a > problem with a recursive script which is shown below. > > sub Recursion { I was thinking that what you probably really want is Oracle's "CONNECT BY" clause so that you wouldn't have to

Re: Recurse gives me No more handles

2009-01-20 Thread Mr. Shawn H. Corey
On Tue, 2009-01-20 at 11:39 -0600, don.walt...@falconjet.com wrote: > I am running DB2 v9 on AIX 5.3.0.0 with perl 5.8.2 and I'm having a > problem with a recursive script which is shown below. > Could you replace the recursion with a loop? sub Recursion { my $sth_leaf; $parentcoid = shi

RE: Recurse gives me No more handles

2009-01-20 Thread Ian Harisay
Is your dataset too large to hold in memory? Another approach would be load each result set into memory. From: don.walt...@falconjet.com [don.walt...@falconjet.com] Sent: Tuesday, January 20, 2009 10:39 AM To: dbi-users@perl.org Subject: Recurse gives me

Re: Recurse gives me No more handles

2009-01-20 Thread Martin Evans
don.walt...@falconjet.com wrote: I am running DB2 v9 on AIX 5.3.0.0 with perl 5.8.2 and I'm having a problem with a recursive script which is shown below. sub Recursion { my $sth_leaf; $parentcoid = shift; $boname = shift; $sth_leaf = $db2->prepare("SELECT hex(CO

Recurse gives me No more handles

2009-01-20 Thread Don.Walters
I am running DB2 v9 on AIX 5.3.0.0 with perl 5.8.2 and I'm having a problem with a recursive script which is shown below. sub Recursion { my $sth_leaf; $parentcoid = shift; $boname = shift; $sth_leaf = $db2->prepare("SELECT hex(COID_REF),CONAME,DCP_UNIQUE_ID FROM S

Re: ORA-00923

2009-01-20 Thread Charles Jardine
On 20/01/09 13:07, Rafael Visser wrote: Hi. The following sql runs ok by sqlplus on the server. === SQL> !more wait_class_ii.sql with aux as ( select *--ash.event_id FROM gv$active_session_history ash where ash.sam

Re: ORA-00923

2009-01-20 Thread Rafael Visser
Great, thanks. Best Regards. Rafael Visser 2009/1/20, Russell, Gordon : > Hia. > Try taking "--ash.event_id" out. > Last time I tried this, DBI/DBD didnt support comments. > That is handled in the sqlplus interface only. > > Hope that helped. > Gordon. > > > -Original Message- > From: Ra

RE: ORA-00923

2009-01-20 Thread Russell, Gordon
Hia. Try taking "--ash.event_id" out. Last time I tried this, DBI/DBD didnt support comments. That is handled in the sqlplus interface only. Hope that helped. Gordon. -Original Message- From: Rafael Visser [mailto:visser.raf...@gmail.com] Sent: 20 January 2009 13:07 To: dbi-users@perl.o

ORA-00923

2009-01-20 Thread Rafael Visser
Hi. The following sql runs ok by sqlplus on the server. === SQL> !more wait_class_ii.sql with aux as ( select *--ash.event_id FROM gv$active_session_history ash where ash.sample_time > SYSDATE - 1/1440) select evt.wa