RE: :ODBC::st execute failed: [unixODBC]ERROR: crossed reserve

RE: :ODBC::st execute failed: [unixODBC]ERROR: crossed reserve

am 05.09.2006 21:19:26 von Martin.Evans

On Tue, 2006-09-05 at 12:09 -0700, Loo, Peter # PHX wrote:
> Martin,
>
> Here is the version:
>
> $ perl -M'DBD::ODBC' -le 'print $DBD::ODBC::VERSION'
> 1.13
>
> Peter

What I meant is what ODBC driver are you using? If you are not sure look
in your odbcinst.ini and odbc.ini files. I have to confess to not
recognising this error but if we knew what odbc driver you are using it
might help.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

> -----Original Message-----
> From: Martin J. Evans [mailto:martin.evans@easysoft.com]
> Sent: Tuesday, September 05, 2006 11:45 AM
> To: dbi-users@perl.org
> Subject: RE: :ODBC::st execute failed: [unixODBC]ERROR: crossed reserve
> :Out of memory
>
> On Tue, 2006-09-05 at 12:34 -0600, Reidy, Ron wrote:
> > So, which is it - errors at 3.8M rows, or 350K rows? When you get
> > errors at 350K, are you array fetching or row-at-a-time fetching?
> > What does -1 mean in the error message?
>
> I can't tell what driver Peter is using because it has not inserted its
> name into the error - this is a bug in itself - it should appear in [ ]
> after [unixODBC]. The -1 is SQL_ERROR and there should be a native error
> too - that is also missing. I've no idea why it shows "SQL-" - this also
> seems incorrect.
>
> This probably does not help much other than to clarify that this driver
> is not fully ODBC complaint in its error reporting.
>
> Martin
> --
> Martin J. Evans
> Easysoft Limited
> http://www.easysoft.com
>
> > -----Original Message-----
> > From: Loo, Peter # PHX [mailto:Peter.Loo@source.wolterskluwer.com]
> > Sent: Tuesday, September 05, 2006 12:15 PM
> > To: Loo, Peter # PHX; Reidy, Ron; DBI-Users
> > Subject: RE: :ODBC::st execute failed: [unixODBC]ERROR: crossed
> > reserve
> > : Out of memory
> >
> >
> > Now I am getting the following error after fetching approximately
> > 350,000 rows.
> >
> > DBD::ODBC::st fetch failed: [unixODBC] (SQL-)(DBD: st_fetch/SQLFetch
> > err=-1) at /usr/local/apps/ppv/devl/bin/sdl.pl line 228, line 53.
>
> >
> > Peter
> >
> > -----Original Message-----
> > From: Loo, Peter # PHX [mailto:Peter.Loo@source.wolterskluwer.com]
> > Sent: Tuesday, September 05, 2006 10:45 AM
> > To: Reidy, Ron; DBI-Users
> > Subject: RE: :ODBC::st execute failed: [unixODBC]ERROR: crossed
> > reserve
> > : Out of memory
> >
> >
> > Hi Ron,
> >
> > I am returning approximately 3.8 million rows. Here is the code:
> >
> > $sqlString = qq{ select distinct x.ptnt_gid, x.prdct_gid,
> > x.rx_fill_dte,
> > x.claim_gid,
> x.ovrd_days_sply_nbr,
> > x.clfsn_grace_prd_nbr, 'N',
> > x.rx_fill_dte +
> > x.ovrd_days_sply_nbr,
> > x.rx_fill_dte -
> > to_date('1980-01-01', 'YYYY-MM-DD'),
> > x.rx_fill_dte +
> > (x.ovrd_days_sply_nbr * 2)
> > from p_dlvrb_rx_claim_extract x,
> > p_dlvrb_ptnt_list y
> > where x.dlvrb_gid = y.dlvrb_gid
> > and x.ptnt_gid = y.ptnt_gid
> > order by x.ptnt_gid, x.prdct_gid, x.rx_fill_dte,
> > x.claim_gid };
> > $sqlString =~ s/\s+/ /g;
> > print STDERR "sqlString is: $sqlString\n";
> > $sth = sub_prepare($driver, $dbh, $sqlString);
> > $sth = sub_execute($driver, $dbh, $sth);
> > my ($ptnt, $prdct, $fill_dte, $claim, $days_sply, $grace, $class,
> > $cted, $since);
> > $sth->bind_columns( undef, \$ptnt, \$prdct, \$fill_dte, \$claim,
> > \$days_sply, \$grace, \$class, \$cted, \$since, \$twice );
> >
> >
> > LINE 88 of GlobalRoutines.pm
> >
> > sub sub_execute($$$) {
> > print STDERR "\n***** sub_execute() *****\n\n";
> > my ($dbDriver, $dbh, $sth) = @_;
> > print STDERR "DATABASE DRIVER IS: $dbDriver\n";
> > print STDERR "DATABASE HANDLE IS: $dbh\n";
> > print STDERR "STATEMENT HANDLE IS: $sth\n";
> > eval { $sth->execute(); }; <<<<<<<<<<<<<<<<<<<<<<
> > if ($@) {
> > $MESSAGE = "sub_execute() - $@";
> > $STATUS = $FAILURE;
> > sub_exit();
> > }
> > print STDERR "RETURN STATEMENT HANDLE IS: $sth\n\n";
> > return($sth);
> > } #<=== (End of sub_execute)
> >
> >
> > Peter
> >
> > -----Original Message-----
> > From: Reidy, Ron [mailto:Ron.Reidy@arraybiopharma.com]
> > Sent: Tuesday, September 05, 2006 10:41 AM
> > To: Loo, Peter # PHX; DBI-Users
> > Subject: RE: :ODBC::st execute failed: [unixODBC]ERROR: crossed
> > reserve
> > : Out of memory
> >
> > Sure,
> >
> > What are you doing in GlabalRoutines.pm at line 88? Are you fetching
> > a large result set into memory (hash or array)?
> >
> > --
> > Ron Reidy
> > Lead DBA
> > Array BioPharma, Inc.
> >
> > -----Original Message-----
> > From: Loo, Peter # PHX [mailto:Peter.Loo@source.wolterskluwer.com]
> > Sent: Tuesday, September 05, 2006 11:38 AM
> > To: DBI-Users
> > Subject: DBD::ODBC::st execute failed: [unixODBC]ERROR: crossed
> > reserve
> > : Out of memory
> >
> > Hi,
> >
> > Will you kindly tell me what this error message is talking about?
> >
> > DBD::ODBC::st execute failed: [unixODBC]ERROR: crossed reserve : Out
> > of memory
> > (SQL-HY000)(DBD: st_execute/SQLExecute err=-1) at
> > /usr/local/apps/common/devl/bin/GlobalRoutines.pm line 88, line
> 53.
> >
> > Thanks.
> >
> > Peter
> >
> > This electronic message transmission is a PRIVATE communication which
> > contains information which may be confidential or privileged. The
> > information is intended to be for the use of the individual or entity
> > named above. If you are not the intended recipient, please be aware
> > that any disclosure, copying, distribution or use of the contents of
> > this information is prohibited. Please notify the sender of the
> > delivery error by replying to this message, or notify us by telephone
> > (877-633-2436, ext. 0), and then delete it from your system.
> >
> >
> >
> > This E-mail message is for the sole use of the intended recipient(s)
> > and may contain confidential and privileged information. Any
> > unauthorized review, use, disclosure or distribution is prohibited.
> > If you are not the intended recipient, please contact the sender by
> > reply E-mail, and destroy all copies of the original message.
> >
> >
> > This E-mail message is for the sole use of the intended recipient(s)
> > and may contain confidential and privileged information. Any
> > unauthorized review, use, disclosure or distribution is prohibited.
> > If you are not the intended recipient, please contact the sender by
> > reply E-mail, and destroy all copies of the original message.
> >
> >
>
>
>
>
> This E-mail message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not
> the intended recipient, please contact the sender by reply E-mail, and
> destroy all copies of the original message.
>
>

RE: :ODBC::st execute failed: [unixODBC]ERROR: crossed reserve:Out of memory

am 05.09.2006 21:29:35 von Peter.Loo

Hi Martin,

Here it is. I have removed the host names.

$ cat /usr/local/etc/odbc.ini
[ODBC]
DebugFile =3D /tmp/oplhsodbc.log
TraceFile =3D /tmp/ihsodbc.log
Trace =3D 1

[ODBC Data Sources]

[AB01]
Driver =3D /usr/local/nz/lib/libnzsqlodbc.so
Description =3D NetezzaSQL ODBC
Servername =
Port =3D 5480
Database =
CancelAsFreeStmt =3D false
CommLog =3D true
Ksqo =3D false
Lie =3D true
Optimizer =3D false
Parse =3D false
PreFetch =3D 256
Protocol =3D 7.0
ReadOnly =3D false
ShowSystemTables =3D false
Socket =3D 16384
DateFormat =3D 1
TranslationDLL =
TranslationName =
TranslationOption =

[AS01]
Driver =3D /usr/local/nz/lib/libnzsqlodbc.so
Description =3D NetezzaSQL ODBC
Servername =
Port =3D 5480
Database =
CancelAsFreeStmt =3D false
CommLog =3D true
Ksqo =3D false
Lie =3D true
Optimizer =3D false
Parse =3D false
PreFetch =3D 256
Protocol =3D 7.0
ReadOnly =3D false
ShowSystemTables =3D false
Socket =3D 16384
DateFormat =3D 1
TranslationDLL =
TranslationName =
TranslationOption =

[ASSQL]
Driver =3D /usr/local/nz/lib/libnzsqlodbc.so
Description =3D NetezzaSQL ODBC
Servername =
Port =3D 5480
Database =
CancelAsFreeStmt =3D false
CommLog =3D true
Ksqo =3D false
Lie =3D true
Optimizer =3D false
Parse =3D false
PreFetch =3D 256
Protocol =3D 7.0
ReadOnly =3D false
ShowSystemTables =3D false
Socket =3D 16384
DateFormat =3D 1
TranslationDLL =
TranslationName =
TranslationOption =

[pgr7_lite]
Driver =3D /export/home/idbamb1/openlink/lib/pgr7_mt_lt.so
ServerType =3D PostgreSQL
;Username =3D
;Password =3D
Database =
Options =3D -H -P 5480 ;; These are the two key parameters
for locating the Postgres (Neteeza) Server, the hostname and portno it
is running on
FetchBufferSize =3D 99
ReadOnly =3D no
DeferLongFetch =3D no
JetFix =3D no
Description =3D Sample PostgreSQL Lite Connection
NO_QUOTED_IDENTIFIERS=3DY

[xxxx]
JetFix =3D No
NoRowSetSizeLimit =3D No
Description =3D Netezza via Openlink Driver test
Options =
ServerType =3D PostgreSQL
Driver =3D /export/home/idbamb1/openlink/lib/pgr7_mt_lt.so
Database =
ReadOnly =3D No
NoAutoCommit =3D No
NoLoginBox =3D No
FetchBufferSize =3D 60=20
=20
Peter=20