RE: DBI error
Hi all, Thank you for replying to my question. I am able to resolve the issue with the following: - gcc 4.2.3 - libgcc 4.2.3 -Run time libraries=libiconv.sl, libintl.sl - DBI-1.161 - DBD-1.27 Set the following variables: OH=/opt/app/oracle/product/10.2.0 ORACLE_HOME=$OH SHLIB_PATH=$OH/lib LD_LIBRARY_PATH=$OH/lib ORACLE_SID=IDB ORACLE_USERID=system/password Install DBI first: perl Makefile.PL make make test make install Install DBD last: perl Makefile.PL -l make make test make install -Original Message- From: Matthew Ramadanovic [mailto:matthew.ramadano...@yale.edu] Sent: Tuesday, February 22, 2011 6:37 AM To: Nguyen, Andrew; dbi-users@perl.org Subject: RE: DBI error Have you made sure your environment points to the new Oracle libraries and not old or nonexistent places? We just complete something similar 9i(Sparc)-ia64(11G) and lots of environment variables needed to be changed to reference the correct location. For instance : LD_LIBRARY_PATH=/export/home/oracle/9.2.0/lib Changed to LD_LIBRARY_PATH=/export/home/oracle/111/lib There are many other examples. Make sure whatever account you are trying to compile as has an environment that has been set up correctly. -M -Original Message- From: stacy.ma...@csiro.au [mailto:stacy.ma...@csiro.au] Sent: Tuesday, February 22, 2011 4:55 AM To: andrew.ngu...@pacificlife.com; dbi-users@perl.org Subject: RE: DBI error Have you recompiled DBI against 10.2.0.4? From: Nguyen, Andrew [andrew.ngu...@pacificlife.com] Sent: Tuesday, 22 February 2011 6:14 AM To: 'dbi-users@perl.org' Subject: DBI error Hi, I am Andrew Nguyen with Pacific Life. We are using Perl DBI-1.28 in Oracle 8.1.7 for many years. We just upgraded our Oracle to 10.2.0. And now the DBI does not work anymore.Please advise what to do. Thank you in advance for your help. OS: HP-UX 11.11. Oracle: 10.2.0.4 pmutindx-root-/home/ssg/perl: perl shchgsum.pl install_driver(Oracle) failed: Can't load '/opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such f ile or directory at /opt/perl_32/lib/5.8.8/PA-RISC1.1-thread-multi/DynaLoader.pm line 230. at (eval 2) line 3 Compilation failed in require at (eval 2) line 3. Perhaps a required shared library or dll isn't installed where expected at /opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/Oraperl.pm line 58 Compilation failed in require at shchgsum.pl line 22. BEGIN failed--compilation aborted at shchgsum.pl line 22. == The information in this e-mail and any attachments are for the sole use of the intended recipient and may contain privileged and confidential information. If you are not the intended recipient, any use, disclosure, copying or distribution of this message or attachment is strictly prohibited. If you believe that you have received this e-mail in error, please contact the sender immediately and delete the e-mail and all of its attachments. ==
DBI error
Hi, I am Andrew Nguyen with Pacific Life. We are using Perl DBI-1.28 in Oracle 8.1.7 for many years. We just upgraded our Oracle to 10.2.0. And now the DBI does not work anymore.Please advise what to do. Thank you in advance for your help. OS: HP-UX 11.11. Oracle: 10.2.0.4 pmutindx-root-/home/ssg/perl: perl shchgsum.pl install_driver(Oracle) failed: Can't load '/opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such f ile or directory at /opt/perl_32/lib/5.8.8/PA-RISC1.1-thread-multi/DynaLoader.pm line 230. at (eval 2) line 3 Compilation failed in require at (eval 2) line 3. Perhaps a required shared library or dll isn't installed where expected at /opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/Oraperl.pm line 58 Compilation failed in require at shchgsum.pl line 22. BEGIN failed--compilation aborted at shchgsum.pl line 22. == The information in this e-mail and any attachments are for the sole use of the intended recipient and may contain privileged and confidential information. If you are not the intended recipient, any use, disclosure, copying or distribution of this message or attachment is strictly prohibited. If you believe that you have received this e-mail in error, please contact the sender immediately and delete the e-mail and all of its attachments. ==
Re: DBI error
On 21/02/11 19:14, Nguyen, Andrew wrote: Hi, I am Andrew Nguyen with Pacific Life. We are using Perl DBI-1.28 in Oracle 8.1.7 for many years. We just upgraded our Oracle to 10.2.0. And now the DBI does not work anymore.Please advise what to do. Thank you in advance for your help. OS: HP-UX 11.11. Oracle: 10.2.0.4 pmutindx-root-/home/ssg/perl: perl shchgsum.pl install_driver(Oracle) failed: Can't load '/opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such f ile or directory at /opt/perl_32/lib/5.8.8/PA-RISC1.1-thread-multi/DynaLoader.pm line 230. at (eval 2) line 3 Compilation failed in require at (eval 2) line 3. Perhaps a required shared library or dll isn't installed where expected at /opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/Oraperl.pm line 58 Compilation failed in require at shchgsum.pl line 22. BEGIN failed--compilation aborted at shchgsum.pl line 22. Did you rebuild DBI and DBD::Oracle after upgrading? Martin -- Martin J. Evans Easysoft Limited http://www.easysoft.com
RE: DBI error
Have you recompiled DBI against 10.2.0.4? From: Nguyen, Andrew [andrew.ngu...@pacificlife.com] Sent: Tuesday, 22 February 2011 6:14 AM To: 'dbi-users@perl.org' Subject: DBI error Hi, I am Andrew Nguyen with Pacific Life. We are using Perl DBI-1.28 in Oracle 8.1.7 for many years. We just upgraded our Oracle to 10.2.0. And now the DBI does not work anymore.Please advise what to do. Thank you in advance for your help. OS: HP-UX 11.11. Oracle: 10.2.0.4 pmutindx-root-/home/ssg/perl: perl shchgsum.pl install_driver(Oracle) failed: Can't load '/opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such f ile or directory at /opt/perl_32/lib/5.8.8/PA-RISC1.1-thread-multi/DynaLoader.pm line 230. at (eval 2) line 3 Compilation failed in require at (eval 2) line 3. Perhaps a required shared library or dll isn't installed where expected at /opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/Oraperl.pm line 58 Compilation failed in require at shchgsum.pl line 22. BEGIN failed--compilation aborted at shchgsum.pl line 22. == The information in this e-mail and any attachments are for the sole use of the intended recipient and may contain privileged and confidential information. If you are not the intended recipient, any use, disclosure, copying or distribution of this message or attachment is strictly prohibited. If you believe that you have received this e-mail in error, please contact the sender immediately and delete the e-mail and all of its attachments. ==
RE: DBI error
Have you made sure your environment points to the new Oracle libraries and not old or nonexistent places? We just complete something similar 9i(Sparc)-ia64(11G) and lots of environment variables needed to be changed to reference the correct location. For instance : LD_LIBRARY_PATH=/export/home/oracle/9.2.0/lib Changed to LD_LIBRARY_PATH=/export/home/oracle/111/lib There are many other examples. Make sure whatever account you are trying to compile as has an environment that has been set up correctly. -M -Original Message- From: stacy.ma...@csiro.au [mailto:stacy.ma...@csiro.au] Sent: Tuesday, February 22, 2011 4:55 AM To: andrew.ngu...@pacificlife.com; dbi-users@perl.org Subject: RE: DBI error Have you recompiled DBI against 10.2.0.4? From: Nguyen, Andrew [andrew.ngu...@pacificlife.com] Sent: Tuesday, 22 February 2011 6:14 AM To: 'dbi-users@perl.org' Subject: DBI error Hi, I am Andrew Nguyen with Pacific Life. We are using Perl DBI-1.28 in Oracle 8.1.7 for many years. We just upgraded our Oracle to 10.2.0. And now the DBI does not work anymore.Please advise what to do. Thank you in advance for your help. OS: HP-UX 11.11. Oracle: 10.2.0.4 pmutindx-root-/home/ssg/perl: perl shchgsum.pl install_driver(Oracle) failed: Can't load '/opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such f ile or directory at /opt/perl_32/lib/5.8.8/PA-RISC1.1-thread-multi/DynaLoader.pm line 230. at (eval 2) line 3 Compilation failed in require at (eval 2) line 3. Perhaps a required shared library or dll isn't installed where expected at /opt/perl_32/lib/site_perl/5.8.8/PA-RISC1.1-thread-multi/Oraperl.pm line 58 Compilation failed in require at shchgsum.pl line 22. BEGIN failed--compilation aborted at shchgsum.pl line 22. == The information in this e-mail and any attachments are for the sole use of the intended recipient and may contain privileged and confidential information. If you are not the intended recipient, any use, disclosure, copying or distribution of this message or attachment is strictly prohibited. If you believe that you have received this e-mail in error, please contact the sender immediately and delete the e-mail and all of its attachments. ==
Re: DBI Error: END failed--call queue aborted.
On Nov 13, 10:19 am, sco...@pythian.com (John Scoles) wrote: You DBD::ORacle is way out of data for you DBI try updating to DBD::Oracle 1.26 ans see what happens cheers The error remains the same :( Thanks for all your help. Not sure what else I can do here. -bash-3.00$ cat test.db.pl use strict; use DBI; my $dbh = DBI-connect( 'dbi:Oracle:DELETED', 'DELETED', 'DELETED', {dbd_verbose = 15} ) || die Database connection not made: $DBI::errstr; $dbh-disconnect; print Done. :)\n; -bash-3.00$ perl -w test.db.pl Environment variables: MANPATH=/opt/SUNWspro/man TERM=xterm SHELL=/usr/bin/bash SSH_CLIENT=172.28.2.66 3369 22 OLDPWD=/export/home/webdev/.cpan SSH_TTY=/dev/pts/4 USER=webdev LD_LIBRARY_PATH=/opt/instantclient10_1 TNS_ADMIN=/opt/instantclient10_1 MAIL=/var/mail//webdev PATH=/usr/bin:/opt/SUNWspro/bin:/opt/instantclient10_1:/usr/ ccs/bin PWD=/export/home/webdev JAVA_HOME=/usr/java TZ=US/Eastern SHLVL=1 HOME=/export/home/webdev LOGNAME=webdev SSH_CONNECTION=172.28.2.66 3369 172.28.1.40 22 ORACLE_HOME=/opt/instantclient10_1 _=/usr/bin/perl OCINlsEnvironmentVariableGet(1,0,93,0,2)=SUCCESS OCINlsEnvironmentVariableGet(1,0,94,0,2)=SUCCESS OCIEnvNlsEnvCreate(1b56bc,OBJECT,2,0,0,0,0,0,0,1,1)=SUCCESS OCIHandleAlloc(2500a0,1b56c0,OCI_HTYPE_ERROR,0,0)=SUCCESS OCIAttrGet(2500a0,OCI_HTYPE_ENV,fee78090,0,31,267a28)=SUCCESS OCIAttrGet(2500a0,OCI_HTYPE_ENV,fee78092,0,262,267a28)=SUCCESS charset id=1, name=US7ASCII, ncharset id=1, name=US7ASCII (csid: utf8=871 al32utf8=873) OCIHandleAlloc(2500a0,1b56c4,OCI_HTYPE_SERVER,0,0)=SUCCESS OCIHandleAlloc(2500a0,1b56c8,OCI_HTYPE_SVCCTX,0,0)=SUCCESS OCIServerAttach(267fb4, 267a28, AHST90, 6, mode=DEFAULT, 0)=SUCCESS OCIAttrSet(2679b4,OCI_HTYPE_SVCCTX, 267fb4,0,Attr=OCI_ATTR_SERVER,267a28)=SUCCESS OCIHandleAlloc(2500a0,1b56cc,OCI_HTYPE_SESSION,0,0)=SUCCESS OCIAttrSet(270ca8,OCI_HTYPE_SESSION, 1a6380,3,Attr=OCI_ATTR_USERNAME,267a28)=SUCCESS OCIAttrSet(270ca8,OCI_HTYPE_SESSION, 1a6390,5,Attr=OCI_ATTR_PASSWORD,267a28)=SUCCESS OCISessionBegin(2679b4,267a28,270ca8,1,mode=DEFAULT 0)=SUCCESS OCIAttrSet(2679b4,OCI_HTYPE_SVCCTX, 270ca8,0,Attr=OCI_ATTR_SESSION,267a28)=SUCCESS OCISessionEnd(2679b4,267a28,270ca8,mode=DEFAULT 0)=SUCCESS OCIServerDetach(267fb4,267a28,mode=DEFAULT,0)=SUCCESS Done. :) OCIHandleFree(270ca8,OCI_HTYPE_SESSION)=SUCCESS OCIHandleFree(2679b4,OCI_HTYPE_SVCCTX)=SUCCESS OCIHandleFree(267fb4,OCI_HTYPE_SERVER)=SUCCESS OCIHandleFree(267a28,OCI_HTYPE_ERROR)=SUCCESS Out of memory! Callback called exit. END failed--call queue aborted. -- i5mast
RE: DBI Error: END failed--call queue aborted.
Ok that cleans it up a little for me. Funny according to the OIC trace you are connecting see below To: dbi-users@perl.org From: mstrum...@gmail.com Subject: Re: DBI Error: END failed--call queue aborted. Date: Wed, 17 Nov 2010 07:50:30 -0800 On Nov 13, 10:19 am, sco...@pythian.com (John Scoles) wrote: You DBD::ORacle is way out of data for you DBI try updating to DBD::Oracle 1.26 ans see what happens cheers The error remains the same :( Thanks for all your help. Not sure what else I can do here. -bash-3.00$ cat test.db.pl use strict; use DBI; my $dbh = DBI-connect( 'dbi:Oracle:DELETED', 'DELETED', 'DELETED', {dbd_verbose = 15} ) || die Database connection not made: $DBI::errstr; $dbh-disconnect; print Done. :)\n; -bash-3.00$ perl -w test.db.pl Environment variables: MANPATH=/opt/SUNWspro/man TERM=xterm SHELL=/usr/bin/bash SSH_CLIENT=172.28.2.66 3369 22 OLDPWD=/export/home/webdev/.cpan SSH_TTY=/dev/pts/4 USER=webdev LD_LIBRARY_PATH=/opt/instantclient10_1 TNS_ADMIN=/opt/instantclient10_1 MAIL=/var/mail//webdev PATH=/usr/bin:/opt/SUNWspro/bin:/opt/instantclient10_1:/usr/ ccs/bin PWD=/export/home/webdev JAVA_HOME=/usr/java TZ=US/Eastern SHLVL=1 HOME=/export/home/webdev LOGNAME=webdev SSH_CONNECTION=172.28.2.66 3369 172.28.1.40 22 ORACLE_HOME=/opt/instantclient10_1 _=/usr/bin/perl OCINlsEnvironmentVariableGet(1,0,93,0,2)=SUCCESS OCINlsEnvironmentVariableGet(1,0,94,0,2)=SUCCESS OCIEnvNlsEnvCreate(1b56bc,OBJECT,2,0,0,0,0,0,0,1,1)=SUCCESS OCIHandleAlloc(2500a0,1b56c0,OCI_HTYPE_ERROR,0,0)=SUCCESS OCIAttrGet(2500a0,OCI_HTYPE_ENV,fee78090,0,31,267a28)=SUCCESS OCIAttrGet(2500a0,OCI_HTYPE_ENV,fee78092,0,262,267a28)=SUCCESS charset id=1, name=US7ASCII, ncharset id=1, name=US7ASCII (csid: utf8=871 al32utf8=873) The above set up you server context OCIHandleAlloc(2500a0,1b56c4,OCI_HTYPE_SERVER,0,0)=SUCCESS OCIHandleAlloc(2500a0,1b56c8,OCI_HTYPE_SVCCTX,0,0)=SUCCESS OCIServerAttach(267fb4, 267a28, AHST90, 6, mode=DEFAULT, 0)=SUCCESS OCIAttrSet(2679b4,OCI_HTYPE_SVCCTX,267fb4,0,Attr=OCI_ATTR_SERVER,267a28)=SUCCESS OCIHandleAlloc(2500a0,1b56cc,OCI_HTYPE_SESSION,0,0)=SUCCESS The above sets up all your handles OCIAttrSet(270ca8,OCI_HTYPE_SESSION,1a6380,3,Attr=OCI_ATTR_USERNAME,267a28)=SUCCESS OCIAttrSet(270ca8,OCI_HTYPE_SESSION,1a6390,5,Attr=OCI_ATTR_PASSWORD,267a28)=SUCCESS OCISessionBegin(2679b4,267a28,270ca8,1,mode=DEFAULT 0)=SUCCESS OCIAttrSet(2679b4,OCI_HTYPE_SVCCTX, 270ca8,0,Attr=OCI_ATTR_SESSION,267a28)=SUCCESS The above users your PW and UN and creates a session and it connects The rest below is what happens when you disconnects OCISessionEnd(2679b4,267a28,270ca8,mode=DEFAULT 0)=SUCCESS OCIServerDetach(267fb4,267a28,mode=DEFAULT,0)=SUCCESS Done. :) OCIHandleFree(270ca8,OCI_HTYPE_SESSION)=SUCCESS OCIHandleFree(2679b4,OCI_HTYPE_SVCCTX)=SUCCESS OCIHandleFree(267fb4,OCI_HTYPE_SERVER)=SUCCESS OCIHandleFree(267a28,OCI_HTYPE_ERROR)=SUCCESS You are now our of OCI/DBD/Oracle Out of memory! So this Out of memory error happens after you have left Can you run a query with your connection handle?? Callback called exit. END failed--call queue aborted. -- i5mast
Re: DBI Error: END failed--call queue aborted.
On Nov 12, 8:24 am, sco...@pythian.com (John Scoles) wrote: If you can run this with dbd_verbose=15 on the connect string the post the results it my help us find an answer. Cheers John Scoles John, I added dbd_verbose but that didn't print any debugging info :( DBI-connect( 'dbi:Oracle:AHST90', 'ahs', 'ahsgc', {dbd_verbose = 15} ) I ran the script with DBI_TRACE=15 and got the following info. I edited the output below and removed user login and SID. I appreciate any help. -bash-3.00$ DBI_TRACE=15 perl -w test.db.pl DBI 1.53-nothread default trace level set to 0x0/15 (pid 28069) 0x2a00 DBI::db::get_info install_method DBI::db::get_info, flags 0x2a00, usage: min 2, max 2, '$info_type' 0x DBI::db::take_imp_data install_method DBI::db::take_imp_data, usage: min 1, max 1, '' 0x0c00 DBI::db::disconnect install_method DBI::db::disconnect , flags 0x0c00, usage: min 1, max 1, '' 0x2000 DBI::db::selectrow_array install_method DBI::db::selectrow_array, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2200 DBI::db::tables install_method DBI::db::tables , flags 0x2200, usage: min 1, max 6, '$catalog, $schema, $table, $type [, \ %attr ]' 0x0430 DBI::db::quote_identifier install_method DBI::db::quote_identifier, flags 0x0430, usage: min 2, max 6, '$name [, ...] [, \%attr ]' 0x DBI::db::clone install_method DBI::db::clone , usage: min 1, max 2, '[\%attr]' 0x0430 DBI::db::quote install_method DBI::db::quote , flags 0x0430, usage: min 2, max 3, '$string [, $data_type ]' 0x2200 DBI::db::type_info install_method DBI::db::type_info , flags 0x2200, usage: min 1, max 2, '$data_type' 0x2a00 DBI::db::statistics_info install_method DBI::db::statistics_info, flags 0x2a00, usage: min 6, max 7, '$catalog, $schema, $table, $unique_only, $quick, [, \%attr ]' 0x2000 DBI::db::selectrow_arrayref install_method DBI::db::selectrow_arrayref, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x0400 DBI::db::begin_work install_method DBI::db::begin_work , flags 0x0400, usage: min 1, max 2, '[ \%attr ]' 0x2800 DBI::db::last_insert_id install_method DBI::db::last_insert_id, flags 0x2800, usage: min 5, max 6, '$catalog, $schema, $table_name, $field_name [, \%attr ]' 0x2a00 DBI::db::foreign_key_info install_method DBI::db::foreign_key_info, flags 0x2a00, usage: min 7, max 8, '$pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table [, \%attr ]' 0x2200 DBI::db::primary_key install_method DBI::db::primary_key , flags 0x2200, usage: min 4, max 5, '$catalog, $schema, $table [, \%attr ]' 0x0c80 DBI::db::commit install_method DBI::db::commit , flags 0x0c80, usage: min 1, max 1, '' 0x0404 DBI::db::ping install_method DBI::db::ping, flags 0x0404, usage: min 1, max 1, '' 0x2000 DBI::db::selectall_arrayref install_method DBI::db::selectall_arrayref, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2a00 DBI::db::type_info_all install_method DBI::db::type_info_all, flags 0x2a00, usage: min 1, max 1, '' 0x3200 DBI::db::do install_method DBI::db::do , flags 0x3200, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2000 DBI::db::selectcol_arrayref install_method DBI::db::selectcol_arrayref, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2200 DBI::db::prepare_cached install_method DBI::db::prepare_cached, flags 0x2200, usage: min 2, max 4, '$statement [, \%attr [, $if_active ] ]' 0x0004 DBI::db::rows install_method DBI::db::rows, flags 0x0004 0x0c80 DBI::db::rollback install_method DBI::db::rollback, flags 0x0c80, usage: min 1, max 1, '' 0x2a00 DBI::db::column_info install_method DBI::db::column_info , flags 0x2a00, usage: min 5, max 6, '$catalog, $schema, $table, $column [, \ %attr ]' 0x2a00 DBI::db::table_info install_method DBI::db::table_info , flags 0x2a00, usage: min 1, max 6, '$catalog, $schema, $table, $type [, \ %attr ]' 0x2a00 DBI::db::primary_key_info install_method DBI::db::primary_key_info, flags 0x2a00, usage: min 4, max 5, '$catalog, $schema, $table [, \%attr ]' 0x2200 DBI::db::prepare install_method DBI::db::prepare , flags 0x2200, usage: min 2, max 3, '$statement [, \%attr]' 0x DBI::db::preparse install_method DBI::db::preparse 0x0100 DBI::db::connected install_method DBI::db::connected , flags 0x0100 0x0200 DBI::db::data_sources install_method DBI::db::data_sources, flags 0x0200, usage: min 1, max 2, '[\%attr]' 0x2000 DBI::db::selectall_hashref install_method DBI::db::selectall_hashref, flags 0x2000, usage: min 3, max 0, '$statement, $keyfield [, \%attr [, @bind_params ] ]' 0x2000 DBI::db::selectrow_hashref install_method DBI::db::selectrow_hashref, flags 0x2000, usage: min 2, max 0,
Re: DBI Error: END failed--call queue aborted.
Well nothing in that pops out at me. You DBD::ORacle is way out of data for you DBI try updating to DBD::Oracle 1.26 ans see what happens cheers On Fri, Nov 12, 2010 at 3:49 PM, i5mast mstrum...@gmail.com wrote: On Nov 12, 8:24 am, sco...@pythian.com (John Scoles) wrote: If you can run this with dbd_verbose=15 on the connect string the post the results it my help us find an answer. Cheers John Scoles John, I added dbd_verbose but that didn't print any debugging info :( DBI-connect( 'dbi:Oracle:AHST90', 'ahs', 'ahsgc', {dbd_verbose = 15} ) I ran the script with DBI_TRACE=15 and got the following info. I edited the output below and removed user login and SID. I appreciate any help. -bash-3.00$ DBI_TRACE=15 perl -w test.db.pl DBI 1.53-nothread default trace level set to 0x0/15 (pid 28069) 0x2a00 DBI::db::get_info install_method DBI::db::get_info, flags 0x2a00, usage: min 2, max 2, '$info_type' 0x DBI::db::take_imp_data install_method DBI::db::take_imp_data, usage: min 1, max 1, '' 0x0c00 DBI::db::disconnect install_method DBI::db::disconnect , flags 0x0c00, usage: min 1, max 1, '' 0x2000 DBI::db::selectrow_array install_method DBI::db::selectrow_array, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2200 DBI::db::tables install_method DBI::db::tables , flags 0x2200, usage: min 1, max 6, '$catalog, $schema, $table, $type [, \ %attr ]' 0x0430 DBI::db::quote_identifier install_method DBI::db::quote_identifier, flags 0x0430, usage: min 2, max 6, '$name [, ...] [, \%attr ]' 0x DBI::db::clone install_method DBI::db::clone , usage: min 1, max 2, '[\%attr]' 0x0430 DBI::db::quote install_method DBI::db::quote , flags 0x0430, usage: min 2, max 3, '$string [, $data_type ]' 0x2200 DBI::db::type_info install_method DBI::db::type_info , flags 0x2200, usage: min 1, max 2, '$data_type' 0x2a00 DBI::db::statistics_info install_method DBI::db::statistics_info, flags 0x2a00, usage: min 6, max 7, '$catalog, $schema, $table, $unique_only, $quick, [, \%attr ]' 0x2000 DBI::db::selectrow_arrayref install_method DBI::db::selectrow_arrayref, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x0400 DBI::db::begin_work install_method DBI::db::begin_work , flags 0x0400, usage: min 1, max 2, '[ \%attr ]' 0x2800 DBI::db::last_insert_id install_method DBI::db::last_insert_id, flags 0x2800, usage: min 5, max 6, '$catalog, $schema, $table_name, $field_name [, \%attr ]' 0x2a00 DBI::db::foreign_key_info install_method DBI::db::foreign_key_info, flags 0x2a00, usage: min 7, max 8, '$pk_catalog, $pk_schema, $pk_table, $fk_catalog, $fk_schema, $fk_table [, \%attr ]' 0x2200 DBI::db::primary_key install_method DBI::db::primary_key , flags 0x2200, usage: min 4, max 5, '$catalog, $schema, $table [, \%attr ]' 0x0c80 DBI::db::commit install_method DBI::db::commit , flags 0x0c80, usage: min 1, max 1, '' 0x0404 DBI::db::ping install_method DBI::db::ping, flags 0x0404, usage: min 1, max 1, '' 0x2000 DBI::db::selectall_arrayref install_method DBI::db::selectall_arrayref, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2a00 DBI::db::type_info_all install_method DBI::db::type_info_all, flags 0x2a00, usage: min 1, max 1, '' 0x3200 DBI::db::do install_method DBI::db::do , flags 0x3200, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2000 DBI::db::selectcol_arrayref install_method DBI::db::selectcol_arrayref, flags 0x2000, usage: min 2, max 0, '$statement [, \%attr [, @bind_params ] ]' 0x2200 DBI::db::prepare_cached install_method DBI::db::prepare_cached, flags 0x2200, usage: min 2, max 4, '$statement [, \%attr [, $if_active ] ]' 0x0004 DBI::db::rows install_method DBI::db::rows, flags 0x0004 0x0c80 DBI::db::rollback install_method DBI::db::rollback, flags 0x0c80, usage: min 1, max 1, '' 0x2a00 DBI::db::column_info install_method DBI::db::column_info , flags 0x2a00, usage: min 5, max 6, '$catalog, $schema, $table, $column [, \ %attr ]' 0x2a00 DBI::db::table_info install_method DBI::db::table_info , flags 0x2a00, usage: min 1, max 6, '$catalog, $schema, $table, $type [, \ %attr ]' 0x2a00 DBI::db::primary_key_info install_method DBI::db::primary_key_info, flags 0x2a00, usage: min 4, max 5, '$catalog, $schema, $table [, \%attr ]' 0x2200 DBI::db::prepare install_method DBI::db::prepare , flags 0x2200, usage: min 2, max 3, '$statement [, \%attr]' 0x DBI::db::preparse install_method DBI::db::preparse 0x0100 DBI::db::connected install_method DBI::db::connected , flags 0x0100 0x0200 DBI::db::data_sources install_method DBI::db::data_sources, flags 0x0200, usage: min 1, max 2,
DBI Error: END failed--call queue aborted.
I'm using Solaris 10 sparc, Perl 5.8.4, DBI 1.615, instantclient 10.1.0.5, DBD::Oracle 1.16. I compiled and installed the modules successfully. I can connect to DB and fetch records just fine. However, when my perl script finishes, it prints out the error. I'm using Sun's compiler cc: Sun C 5.8 Patch 121015-04 2007/01/10 I've tried DBD::Oracle 1.24 and DBI 1.53 versions but the error still happens at the end :( I've read about other people getting this message but no resolution. I would appreciate any help. use strict; use DBI; my $dbh = DBI-connect( 'dbi:Oracle:XXX', 'user', 'passwd', ) || die Database connection not made: $DBI::errstr; $dbh-disconnect; print Done. :)\n; Done. :) Out of memory! Callback called exit. END failed--call queue aborted. -- i5mast
Re: DBI Error: END failed--call queue aborted.
On 10/11/2010 11:11 AM, i5mast wrote: If you can run this with dbd_verbose=15 on the connect string the post the results it my help us find an answer. Cheers John Scoles I'm using Solaris 10 sparc, Perl 5.8.4, DBI 1.615, instantclient 10.1.0.5, DBD::Oracle 1.16. I compiled and installed the modules successfully. I can connect to DB and fetch records just fine. However, when my perl script finishes, it prints out the error. I'm using Sun's compiler cc: Sun C 5.8 Patch 121015-04 2007/01/10 I've tried DBD::Oracle 1.24 and DBI 1.53 versions but the error still happens at the end :( I've read about other people getting this message but no resolution. I would appreciate any help. use strict; use DBI; my $dbh = DBI-connect( 'dbi:Oracle:XXX', 'user', 'passwd', ) || die Database connection not made: $DBI::errstr; $dbh-disconnect; print Done. :)\n; Done. :) Out of memory! Callback called exit. END failed--call queue aborted. -- i5mast
Re: DBI error
Probably you mixed two DBI installations. The 1.40 version may be incomplete, but at least some libraries survived and exist in a directory that is searched before directory where the 1.42 librarys exist. If you install the DBI modules from a package manager (like apt-get, rpm), try to remove and install from CPAN. -Thiago Rondon amos.nak...@seagate.com escreveu: Hi, Am getting the following DBI error. I think l might have too versions installed. How do l un-install one and leave the other? DBI object version 1.40 does not match $DBI::VERSION 1.42 at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 253. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5 /i386-linux-thread-multi/DBI.pm line 259. Compilation failed in require at /apps/code/e3.pl line 4. BEGIN failed--compilation aborted at /apps/code/e3.pl line 4 Regards, Amos Nakolo IT Systems Engineer Seagate Oklahoma
DBI error
Hi, Am getting the following DBI error. I think l might have too versions installed. How do l un-install one and leave the other? DBI object version 1.40 does not match $DBI::VERSION 1.42 at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 253. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5 /i386-linux-thread-multi/DBI.pm line 259. Compilation failed in require at /apps/code/e3.pl line 4. BEGIN failed--compilation aborted at /apps/code/e3.pl line 4 Regards, Amos Nakolo IT Systems Engineer Seagate Oklahoma
Re: DBI error
On Tue, 29 Jan 2008 13:44:16 -0700, Kirthi Prabhu wrote: I get the pg.pm file and I have placed that in DBD/ folder. Generally not a good sign... When I use DBI - Connect I get the following error install_driver(Pg) failed: Can't locate loadable object for module DBD::Pg in @INC I was expecting that. This means you don't have the DLL that belongs to DBD::Pg. Just copying the Pure Perl part of the module is not good enough. Just install the DBD::PG module properly, for example with PPM, instead of his halfhearted attempt, which you should not undertake unless you know very much what you're doing (in which case you wouldn't be asking about this error...) -- Bart.
DBI error
I have downloaded the latest version of DBI:pg package and extracted it to perl/lib. I get the pg.pm file and I have placed that in DBD/ folder. When I use DBI - Connect I get the following error C:\*\UtilityGeneratePFResults.pl @INC is C:/Perl/site/lib C:/Perl/lib . install_driver(Pg) failed: Can't locate loadable object for module DBD::Pg in @INC (@INC c ontains: C:/Perl/site/lib C:/Perl/lib .) at (eval 8) line 3 Compilation failed in require at (eval 8) line 3. Perhaps a module that DBD::Pg requires hasn't been fully installed at C:\Jmeter\Utility\GeneratePFResults.pl line 54 Please help. Best Regards, Kirthi Prabhu | Senior Quality Analyst | MphasiS an EDS Company Tel 602.604.3100 ext [293] | Fax: 602.604.3115| eMail: [EMAIL PROTECTED] | www.mphasis.com http://www.mphasis.com/ -- CONFIDENTIALITY NOTICE -- Information transmitted by this e-mail is proprietary to MphasiS and/or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this e-mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at [EMAIL PROTECTED] and delete this mail from your records.
DBI - error
Hi, I am trying to execute the stored procedure using dbh. The procedure details are as follows: proc_dequeue( BALID,strRequestXML,strStatus) where: BALID - Integer, strRequestXML - XMLType, strStatus - varchar The perl script implemented is : my $sth = $dbh1-prepare(begin proc_dequeue(:BALID,:strRequestXML,:strStatus); end;); $sth-bind_param_inout(:BALID,\$o_balid,20,\%attr ); $sth-bind_param_inout(:strRequestXML,\$o_requestXML,5,\%attr); $sth-bind_param_inout(:strStatus,\$o_status,2,\%attr); and the error message i am getting is : DBD::Oracle::st execute failed: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'proc_dequeue' ORA-06550: line 1, column 7: PL/SQL: Statement ignored (DBD ERROR: OCIStmtExecute) at ./ListenerBalA line 32. DBD::Oracle::st execute failed: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'proc_dequeue' Please help me to resolve this problem. Thanks in advance. Regards, Sumitra Tech Mahindra, formerly Mahindra-British Telecom. Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review at a href=http://www.techmahindra.com/Disclaimer.html;http://www.techmahindra.com/Disclaimer.html/a externally and a href=http://tim.techmahindra.com/Disclaimer.html;http://tim.techmahindra.com/Disclaimer.html/a internally within Tech Mahindra.
RE: DBI - error
Sumitra Gatade wrote: Hi, I am trying to execute the stored procedure using dbh. The procedure details are as follows: proc_dequeue( BALID,strRequestXML,strStatus) where: BALID - Integer, strRequestXML - XMLType, strStatus - varchar The perl script implemented is : my $sth = $dbh1-prepare(begin proc_dequeue(:BALID,:strRequestXML,:strStatus); end;); $sth-bind_param_inout(:BALID,\$o_balid,20,\%attr ); $sth-bind_param_inout(:strRequestXML,\$o_requestXML,5,\%attr); $sth-bind_param_inout(:strStatus,\$o_status,2,\%attr); and the error message i am getting is : DBD::Oracle::st execute failed: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'proc_dequeue' You are passing a string to a function that expects XMLType, an opaque Oracle object type. The XMLType API provides a constructor that takes a varchar2 argument, so try changing your statement to: begin proc_dequeue(:BALID,XMLType(:strRequestXML),:strStatus); end; Regards, Philip
RE: DBI - error
This is not a DBI or a perl issue. Read your error stack and resolve your Oracle issue. -- Ron Reidy Lead DBA Array BioPharma, Inc. -Original Message- From: Sumitra Gatade [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 07, 2006 6:01 AM To: dbi-users@perl.org Subject: DBI - error Hi, I am trying to execute the stored procedure using dbh. The procedure details are as follows: proc_dequeue( BALID,strRequestXML,strStatus) where: BALID - Integer, strRequestXML - XMLType, strStatus - varchar The perl script implemented is : my $sth = $dbh1-prepare(begin proc_dequeue(:BALID,:strRequestXML,:strStatus); end;); $sth-bind_param_inout(:BALID,\$o_balid,20,\%attr ); $sth-bind_param_inout(:strRequestXML,\$o_requestXML,5,\%attr); $sth-bind_param_inout(:strStatus,\$o_status,2,\%attr); and the error message i am getting is : DBD::Oracle::st execute failed: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'proc_dequeue' ORA-06550: line 1, column 7: PL/SQL: Statement ignored (DBD ERROR: OCIStmtExecute) at ./ListenerBalA line 32. DBD::Oracle::st execute failed: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'proc_dequeue' Please help me to resolve this problem. Thanks in advance. Regards, Sumitra Tech Mahindra, formerly Mahindra-British Telecom. Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review at a href=http://www.techmahindra.com/Disclaimer.html;http://www.techmahind ra.com/Disclaimer.html/a externally and a href=http://tim.techmahindra.com/Disclaimer.html;http://tim.techmahind ra.com/Disclaimer.html/a internally within Tech Mahindra. 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.
Re: Possible extension for DBI error handler (fwd)
Tim Bunce wrote: On Wed, Jan 25, 2006 at 02:51:14PM -0500, Steven Lembark wrote: -- Tim Bunce [EMAIL PROTECTED] $dbh-connect_cached( @{ $meta{ $dbh } } ); If the connection has failed then connect_cached() will return a new, different, $dbh which would be lost with the code above. To change the $dbh in the application to be this new $dbh you'd need to use swap_internal_handle(). If I was mad enough to try this I'd probably do: $new_dbh = $dbh-clone; $dbh-swap_internal_handle($new_dbh); So much for hacking error handlers in my mail editor :-) Why mad enough? The point is that if I have a long running (months at a time) daemon then it'd be nice not to have to restart it each time the databas is restarted: just let HandleError deal with it and keep on trukin... Sure, I can certainly understand the motivation. It's just that I suspect there will be plenty of worms to deal with in this can before you arrive at a reasonably robust solution. Tim. That's what I did with DBIx::HA, which was the reason for my requesting swap_inner_handle() in the first place. :-) Very obscure worms still existed as of DBI 1.45. I haven't checked since, but the problems were extremely hard to reproduce (of course). H
Re: Possible extension for DBI error handler (fwd)
-- Tim Bunce [EMAIL PROTECTED] $dbh-connect_cached( @{ $meta{ $dbh } } ); If the connection has failed then connect_cached() will return a new, different, $dbh which would be lost with the code above. To change the $dbh in the application to be this new $dbh you'd need to use swap_internal_handle(). If I was mad enough to try this I'd probably do: $new_dbh = $dbh-clone; $dbh-swap_internal_handle($new_dbh); So much for hacking error handlers in my mail editor :-) Why mad enough? The point is that if I have a long running (months at a time) daemon then it'd be nice not to have to restart it each time the databas is restarted: just let HandleError deal with it and keep on trukin... -- Steven Lembark 85-09 90th Street Workhorse ComputingWoodhaven, NY 11421 [EMAIL PROTECTED] 1 888 359 3508
Re: Possible extension for DBI error handler (fwd)
On Wed, Jan 25, 2006 at 02:51:14PM -0500, Steven Lembark wrote: -- Tim Bunce [EMAIL PROTECTED] $dbh-connect_cached( @{ $meta{ $dbh } } ); If the connection has failed then connect_cached() will return a new, different, $dbh which would be lost with the code above. To change the $dbh in the application to be this new $dbh you'd need to use swap_internal_handle(). If I was mad enough to try this I'd probably do: $new_dbh = $dbh-clone; $dbh-swap_internal_handle($new_dbh); So much for hacking error handlers in my mail editor :-) Why mad enough? The point is that if I have a long running (months at a time) daemon then it'd be nice not to have to restart it each time the databas is restarted: just let HandleError deal with it and keep on trukin... Sure, I can certainly understand the motivation. It's just that I suspect there will be plenty of worms to deal with in this can before you arrive at a reasonably robust solution. Tim.
Re: Possible extension for DBI error handler (fwd)
From DBI's pod: This only works for methods which return a single value and is hard to make reliable (avoiding infinite loops, for example) and so isn't recommended for general use! If you find a good use for it then please let me know. The use of it would be returning a defined-but-false value (probably '') on the way through. The use would be: my $err_handler = sub { # boilerplate ... if( $err =~ /$regex_for_connection_errors/o ) { log_error 'Failed database connection:', $err; $dbh-connect_cached( @{ $meta{ $dbh } } ); $_[-1] = ''; # short circut the handler logic and let the # caller deal with the false return value. 1 } else { # nothing I can do about it... let the exception # take its course... 0 } }; this allows a polling daemon to use code like: POLL: for(;;) { if( my $now = $get_dbtime_t-() ) { sleep $poll_int - ( $now % $poll_int ); my $rowz = $dbh-selectall_arrayref( $sth, undef, @valuz ) ) or next POLL; ... } # at this point the connection error was rendered non-fatal # by the handler. and the database handle [hopefully] re- # connected to the database. in any case, we will find out # about it on the next polling pass... } Thing about this approach is that I don't need an explicit check for the error in my main code. What'd really be sexy -- and seems doable from what I've seen inside DBI -- is to use tristate logic to allow restarting the failed operation: sub some_dbi_method { my $result = do { if( my $handler = $dbh-{meta}{err_handler} ) { $handler-( $errstr, $dbh, $ret ); } else { undef } }; if( $result ) { # caller dealt with it. return $ret; } elsif( defined $result ) { # retry the failed operation by jumping back into the # current subroutine. goto foo; } else { # error handler set result to undef, which means # to let RaiseError, etc, follow its normal course. $dbh-_raise_error; } } The user would have to manage their own timeouts in a place accessable to the error handler (kwikhak, without boilerplate): my %meta = (); my $handle_error = sub { my( $err, $dbh, $cruft ) = @_; if( $err =~ /$regex/o ) { my( $time, $trys, $argz ) = @{ $meta{ $dbh } }{ qw(timeout, retry_count, connect_args) }; for( 1..$trys ) { # carp would help the poor slob debugging # this figure out WHICH dbh is causing # the pain. carp Retrying connection ($_)...; $_[0] = DBI-connect( @$argz ) and last; sleep $time; } # return false-but-defined if the connection was # remade, otherwise give up. $_[0] ? '' : undef; } else { undef } }; # override the DBI constrctors with one that # saves the arguments for future use and then # redispatches them to DBI. for( qw(connect connect_cached connect_whatever) ) { my $dbisub = DBI-can( $name ); my $ref = qualify_to_ref $_, __PACKAGE__; *$ref = sub { my $proto = shift; $_[ -1 ]-{ HandleError } ||= $handle_error; my $argz = [ @_ ]; unshift @_, DBI; my $dbh = $dbisub; $meta{ $dbh } = $argz; }; } This allows a derived class to reconnect and retry the operation without having to wrap the DBI class at all. This also minimized the overhead since it doees not require an AUTOLOAD or re-dispatching every call: only the constructors are overloaded and they all pass the result off to DBI as-is. I could dodge overloading the DBI constructors by calling a separate metadata storage routine. The only way to avoid wrapping all of the DBI calls in their own eval's seems to be some way for HandleError to retry the failed operation if it thinks the underlying issue has been resolved. enjoi -- Steven Lembark 85-09 90th Street Workhorse ComputingWoodhaven, NY 11421 [EMAIL PROTECTED] 1 888 359 3508
Re: Possible extension for DBI error handler (fwd)
On Mon, Jan 23, 2006 at 02:37:24PM -0500, Steven Lembark wrote: From DBI's pod: This only works for methods which return a single value and is hard to make reliable (avoiding infinite loops, for example) and so isn't recommended for general use! If you find a good use for it then please let me know. The use of it would be returning a defined-but-false value (probably '') on the way through. The use would be: my $err_handler = sub { # boilerplate ... if( $err =~ /$regex_for_connection_errors/o ) { log_error 'Failed database connection:', $err; $dbh-connect_cached( @{ $meta{ $dbh } } ); If the connection has failed then connect_cached() will return a new, different, $dbh which would be lost with the code above. To change the $dbh in the application to be this new $dbh you'd need to use swap_internal_handle(). If I was mad enough to try this I'd probably do: $new_dbh = $dbh-clone; $dbh-swap_internal_handle($new_dbh); Tim. $_[-1] = ''; # short circut the handler logic and let the # caller deal with the false return value. 1 } else { # nothing I can do about it... let the exception # take its course... 0 } }; this allows a polling daemon to use code like: POLL: for(;;) { if( my $now = $get_dbtime_t-() ) { sleep $poll_int - ( $now % $poll_int ); my $rowz = $dbh-selectall_arrayref( $sth, undef, @valuz ) ) or next POLL; ... } # at this point the connection error was rendered non-fatal # by the handler. and the database handle [hopefully] re- # connected to the database. in any case, we will find out # about it on the next polling pass... } Thing about this approach is that I don't need an explicit check for the error in my main code. What'd really be sexy -- and seems doable from what I've seen inside DBI -- is to use tristate logic to allow restarting the failed operation: sub some_dbi_method { my $result = do { if( my $handler = $dbh-{meta}{err_handler} ) { $handler-( $errstr, $dbh, $ret ); } else { undef } }; if( $result ) { # caller dealt with it. return $ret; } elsif( defined $result ) { # retry the failed operation by jumping back into the # current subroutine. goto foo; } else { # error handler set result to undef, which means # to let RaiseError, etc, follow its normal course. $dbh-_raise_error; } } The user would have to manage their own timeouts in a place accessable to the error handler (kwikhak, without boilerplate): my %meta = (); my $handle_error = sub { my( $err, $dbh, $cruft ) = @_; if( $err =~ /$regex/o ) { my( $time, $trys, $argz ) = @{ $meta{ $dbh } }{ qw(timeout, retry_count, connect_args) }; for( 1..$trys ) { # carp would help the poor slob debugging # this figure out WHICH dbh is causing # the pain. carp Retrying connection ($_)...; $_[0] = DBI-connect( @$argz ) and last; sleep $time; } # return false-but-defined if the connection was # remade, otherwise give up. $_[0] ? '' : undef; } else { undef } }; # override the DBI constrctors with one that # saves the arguments for future use and then # redispatches them to DBI. for( qw(connect connect_cached connect_whatever) ) { my $dbisub = DBI-can( $name ); my $ref = qualify_to_ref $_, __PACKAGE__; *$ref = sub { my $proto = shift; $_[ -1 ]-{ HandleError } ||= $handle_error; my $argz = [ @_ ]; unshift @_, DBI; my $dbh = $dbisub; $meta{ $dbh } = $argz; }; } This allows a derived class to reconnect and retry the operation without having to wrap the DBI class at all. This also minimized the overhead since it doees not require an AUTOLOAD or re-dispatching every call: only the constructors are overloaded and they all pass the result off to DBI as-is. I could dodge overloading the DBI constructors by calling a
RE: [dbi] error string being lost in DBD::ODBC
Adam, Have you tried: odbc_async_exec Allow asynchronous execution of queries. Right now, this causes a spin-loop (with a small sleep) until the sql is complete. This is useful, however, if you want the error handling and asynchronous messages (see the err_handler) below. See t/20SQLServer.t for an example of this. setting this (from DBD::ODBC pod). Martin -- Martin J. Evans Easysoft Ltd, UK Development On 01-Aug-2005 Mitchell, Adam R wrote: I'm having a problem where the error string from a raiserror (inside a stored procedure) is disappearing. I've reduced it to the fact that it only occurs if there is some part of the stored procedure that returns rows (0 or more). Here is a code snippet that illustrates the problem: use DBI; use DBD::ODBC; my $dbh = DBI-connect(my_sqlserver_database,myuser,mypass); $sql = create procedure test_raiserror1 as begin raiserror('my error',16,1) with nowait end; $dbh-do($sql) || die $DBD::errstr; $sql = create procedure test_raiserror2 as begin select (1) raiserror('my error',16,1) with nowait end; $dbh-do($sql) || die $DBD::errstr; print created\n\n; #this bit correctly returns my error into dbi::errstr $sql = test_raiserror1; print test_raiserror1:\n; $rows = $dbh-do($sql); print rows: $rows\n; print errstr: $DBI::errstr\n\n; #this one does not $sql = test_raiserror2; print test_raiserror2:\n; $rows = $dbh-do($sql); print rows: $rows\n; print errstr: $DBI::errstr\n\n; $sql = drop procedure test_raiserror1; $dbh-do($sql) || die $DBD::errstr; $sql = drop procedure test_raiserror2; $dbh-do($sql) || die $DBD::errstr; print dropped\n\n; Note how the first one returns the error, while the second one simply returns -1. I think it may have to do with the string returned from sql server. Here is the difference in the return string when they are executed in ms sql query analyzer: test1: Server: Msg 5, Level 16, State 1, Procedure test_raiserror1, Line 4 my error test2: (1 row(s) affected) Server: Msg 5, Level 16, State 1, Procedure test_raiserror1, Line 4 my error Does anyone know how I can get at the error string? Thanks, Adam Mitchell
Re: HELP!! DBI Error!!
Yes I did... I tired initially using ppm; but then it couldnt even connect to the repository!! When I tried ppm3, it connected and also listed the DBI I wanted. What do I do next?? Please help. Thank u, Trupti... - Original Message - From: Jeff Holt [EMAIL PROTECTED] To: 'Trupti Kulkarni' [EMAIL PROTECTED] Sent: Thursday, January 29, 2004 9:49 PM Subject: RE: HELP!! DBI Error!! Did you try the installing DBI by using ppm instead of ppm3? Jeff Holt Hotsos Enterprises, Ltd. http://www.hotsos.com Upcoming events at http://www.hotsos.com/education/schedule.html -Original Message- From: Trupti Kulkarni [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 01:23 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: HELP!! DBI Error!! Hello all, I have downloaded the latest version of Perl from ActiveState. After successful installation, I entered ppm3 at the command prompt. Once at the ppm prompt, search DBI showed me a lot of files. I then typed installed DBI.ppd and here's where the problem is: it came back to the E:\ prompt (the drive where I've installed Perl). It gave a message: Error: PPM::PPD constructor called with undef PPM Where do I go from here?? Did I go wrong somewhere?? Please help me. I'm using Windows 2000 and will be using the MS-SQL databse for connecting to a database. Kindly help me at the earliest. Waiting, Thank u, Trupti * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com
RE: HELP!! DBI Error!!
I did the exact same procedure as u told me: but the error remains the same!!! I'm so frustrated!!! Whatever method I use, its the same error!! I even tried uninstalling and reinstalling Perl, but it doesnt help... here is the error I get... Error: PPM::PPD constructor called with undef ppd $VAR1 = 'PPM::Installer'; $VAR2 = 'C:/Perl/site/lib/PPM/Installer.pm'; $VAR3 = 151; $VAR4 = 'PPM::PPD::new'; $VAR5 = 1; $VAR6 = 1; $VAR7 = undef; $VAR8 = undef; $VAR9 = 2; $VAR10 = ''; WHERE DO I GO FROM HERE?? I have no clue what else I can do... Please help!!! Anxiously waiting, Trupti... Thutika, Srinivas (ODC - Satyam) [EMAIL PROTECTED] said: hi , The procedure is as below After installation of perl.. Dowonload the modules from the link if u r working on windows http://ppm.activestate.com/PPMPackages/zips/8xx-builds-only/Windows/ Now go to u r ppm prompt Then set u r local repository as below rep add local_rep e:\perl\lib(Where ever u r perl installation takes place) Now unzip the perl module which u want to install Goto the .ppd file direcotry... now go to ppm prompt... now use install xxx.ppd command Hope u can solve u r problem... regards, srini. -Original Message- From: Trupti Kulkarni [mailto:[EMAIL PROTECTED] Sent: Friday, January 30, 2004 9:17 AM To: Jeff Holt Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: HELP!! DBI Error!! Yes I did... I tired initially using ppm; but then it couldnt even connect to the repository!! When I tried ppm3, it connected and also listed the DBI I wanted. What do I do next?? Please help. Thank u, Trupti... - Original Message - From: Jeff Holt [EMAIL PROTECTED] To: 'Trupti Kulkarni' [EMAIL PROTECTED] Sent: Thursday, January 29, 2004 9:49 PM Subject: RE: HELP!! DBI Error!! Did you try the installing DBI by using ppm instead of ppm3? Jeff Holt Hotsos Enterprises, Ltd. http://www.hotsos.com Upcoming events at http://www.hotsos.com/education/schedule.html -Original Message- From: Trupti Kulkarni [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 01:23 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: HELP!! DBI Error!! Hello all, I have downloaded the latest version of Perl from ActiveState. After successful installation, I entered ppm3 at the command prompt. Once at the ppm prompt, search DBI showed me a lot of files. I then typed installed DBI.ppd and here's where the problem is: it came back to the E:\ prompt (the drive where I've installed Perl). It gave a message: Error: PPM::PPD constructor called with undef PPM Where do I go from here?? Did I go wrong somewhere?? Please help me. I'm using Windows 2000 and will be using the MS-SQL databse for connecting to a database. Kindly help me at the earliest. Waiting, Thank u, Trupti * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com -- * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com
Re: HELP!! DBI Error!!
Trupti Kulkarni wrote: Yes I did... I tired initially using ppm; but then it couldnt even connect to the repository!! When I tried ppm3, it connected and also listed the DBI I wanted. What do I do next?? Please help. Thank u, Trupti... - Original Message - From: Jeff Holt [EMAIL PROTECTED] To: 'Trupti Kulkarni' [EMAIL PROTECTED] Sent: Thursday, January 29, 2004 9:49 PM Subject: RE: HELP!! DBI Error!! Did you try the installing DBI by using ppm instead of ppm3? Jeff Holt Hotsos Enterprises, Ltd. http://www.hotsos.com Upcoming events at http://www.hotsos.com/education/schedule.html -Original Message- From: Trupti Kulkarni [mailto:[EMAIL PROTECTED] Sent: Thursday, January 29, 2004 01:23 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: HELP!! DBI Error!! Hello all, I have downloaded the latest version of Perl from ActiveState. After successful installation, I entered ppm3 at the command prompt. Once at the ppm prompt, search DBI showed me a lot of files. I then typed installed DBI.ppd and here's where the problem is: it came back to the E:\ prompt (the drive where I've installed Perl). It gave a message: Error: PPM::PPD constructor called with undef PPM Where do I go from here?? Did I go wrong somewhere?? Please help me. I'm using Windows 2000 and will be using the MS-SQL databse for connecting to a database. Kindly help me at the earliest. Waiting, Thank u, Trupti * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com Once you see it on the list note the number associated with it. Then at the PPM prompt type: PPM install number
HELP!! DBI Error!!
Hello all, I have downloaded the latest version of Perl from ActiveState. After successful installation, I entered ppm3 at the command prompt. Once at the ppm prompt, search DBI showed me a lot of files. I then typed installed DBI.ppd and here's where the problem is: it came back to the E:\ prompt (the drive where I've installed Perl). It gave a message: Error: PPM::PPD constructor called with undef PPM Where do I go from here?? Did I go wrong somewhere?? Please help me. I'm using Windows 2000 and will be using the MS-SQL databse for connecting to a database. Kindly help me at the earliest. Waiting, Thank u, Trupti * Disclaimer This message (including any attachments) contains confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this message and are hereby notified that any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited. * Visit us at http://www.mahindrabt.com
Re: HELP!! DBI Error!!
On 01/28/2004 11:22 PM, Trupti Kulkarni wrote: I have downloaded the latest version of Perl from ActiveState. After successful installation, I entered ppm3 at the command prompt. Once at the ppm prompt, search DBI showed me a lot of files. I then typed installed DBI.ppd and here's where the problem is: it came back to the E:\ prompt (the drive where I've installed Perl). It gave a message: Error: PPM::PPD constructor called with undef PPM Where do I go from here?? Did I go wrong somewhere?? Please help me. I'm using Windows 2000 and will be using the MS-SQL databse for connecting to a database. This is a problem with a PPM provided by ActiveState. Try their mail lists. I recommend either perl-win32-users or perl-win32-database. http://aspn.activestate.com/ASPN/Mail/ -- Mac :}) ** I usually forward private questions to the appropriate mail list. ** Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
Re: help on dbi error
On Wed, 19 Nov 2003 00:10:17 + suresh nair [EMAIL PROTECTED] wrote: this is suresh here, working for boeing. actually we had our unix boxes updated to a new version alongwith a new version of perl, and suddenly some of our perl codes which were using DBI-connect started to bomb, giving this message: install_driver(Oracle) failed: Can't load '/ots/perl-5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file or directory at /ots/perl-5.6.1/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206. at (eval 11) line 3 Compilation failed in require at (eval 11) line 3. Perhaps a required shared library or dll isn't installed where expected at /home/ipmdsnet/alpha/lib/IPMDS.pm line 64 start: Mon Nov 17 16:07:26 2003 while searching for any solution to this problem, i came across a thread of discussion where in u have put a query regarding the same exact error. did u find a solution? will you be kind enough to pass it on, if u did? we need to absolutely run something tommorow evening, and we are all at sea regarding the solution to the problem. The correct forum for this problem is [EMAIL PROTECTED] If you haven't already rebuilt DBI and DBD::Oracle, do so now. Upgrading to the latest version would also be a good idea. Also make sure the account that is trying to run the script has read permission for the Perl modules and read and execute permission for any shared libraries, including those in $ORACLE_HOME/lib/. -- Mac :}) ** I usually forward private questions to the appropriate mail list. ** Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
Supurious DBI error
on DBI 1.37, DBD::Oracle 1.14 on SunOS with perl 5.8.0 and gcc 2.95.3 Assuming I never actually call disconnect() and I'm running under Apache 1.3.27, Apache::DBI, and mod_perl 1.27 what could cause this error ? DBD::Oracle::db prepare failed: ERROR Database disconnected [for statement ``sql here'']) I did subclass the DBI module. I did _not_ override the disconnect() method. I did override the connect() method. package AMSDBI; our $db_attrs = {RaiseError = 1, PrintError = 0, Taint = 1, AutoCommit = 0}; sub connect { my ($drh, $dsn, $db_user, $db_pass, $db_tracefile, $db_tracelevel, $db_type) = @_; $AMSDBI::db_attrs-{'RaiseError'} = 0; my $dbh = $drh-SUPER::connect($dsn, $db_user, $db_pass, $AMSDBI::db_attrs) || database_connect_failed(); $AMSDBI::db_attrs-{'RaiseError'} = 1; $dbh-{RaiseError} = 1; $dbh-{odbc_default_bind_type} = SQL_VARCHAR if $db_type =~ /MSSQL/i; $dbh-{LongReadLen}= 5; $dbh-{LongTruncOk}= 1; $dbh-{ShowErrorStatement} = 1; $dbh-{ChopBlanks} = 1; $dbh-{FetchHashKeyName} = NAME_lc; $dbh-trace($db_tracelevel, $db_tracefile); return $dbh; } This error is completely random and only occurs on the above combination AFAIK. This error is also never the same prepare() that fails. And its not usually any of the first 10 that would run during any giving request. The SQL is all valid as 98% of the the time everything is fine. I don't have the trace file handy, but the next time it happens, I can grab it and post it if needed.
Re: Supurious DBI error
On Wed, Aug 27, 2003 at 09:44:47PM -0400, Philip M. Gollucci wrote: I don't have the trace file handy, but the next time it happens, I can grab it and post it if needed. Won't get far without it. Tim.
Re: Supurious DBI error
Unless I'm mistaken, this is 2 runs through. The first fails with the error. The second works. Thanks in advance. T - STORE('RaiseError' 1)= 1 at AMSDBI.pm line 148 T - STORE('LongReadLen' 5)= 1 at AMSDBI.pm line 151 T - STORE('LongTruncOk' 1)= 1 at AMSDBI.pm line 152 T - STORE('ShowErrorStatement' 1)= 1 at AMSDBI.pm line 153 T - STORE('ChopBlanks' 1)= 1 at AMSDBI.pm line 154 T - STORE('FetchHashKeyName' 'NAME_lc')= 1 at AMSDBI.pm line 155 T - trace(1 '/opt/ejpress/ams/files/logs/ams.trace')= 1 at AMSDBI.pm line 157 T - STORE('HandleError' CODE(0x10b2848))= 1 at main.plex line 93 error: -1 'ERROR Database disconnected' T - DESTROY= undef at AMSDBI.pm line 203 !! ERROR: -1 'ERROR Database disconnected' T - prepare('SELECT p_id FROM Membership WHERE member_id = ?')= undef at AMSDBI.pm line 203 error: -1 'ERROR Database disconnected' 1T - FETCH('ParamValues')= undef at AMSDBI.pm line 203 - HandleError on AMSDBI::db=HASH(0x18d7950) via CODE(0x10b2848) (undef) error: -1 'ERROR Database disconnected' T - DESTROY= undef at AMSDBI.pm line 203 !! ERROR: -1 'ERROR Database disconnected' 1T - prepare('select SYSDATE from DUAL /* ping */')= undef at AMSDBI.pm line 203 error: -1 'ERROR Database disconnected' T - ping= 0 at DBI.pm line 109 AMSDBI::db=HASH(0x16c2464) trace level set to 1 in DBI 1.37-nothread error: -1 'ERROR Database disconnected' T - DESTROY= undef at main.plex line 93 T - STORE('HandleError' CODE(0x10b4848))= 1 at main.plex line 93 T - prepare('SELECT p_id FROM Membership WHERE member_id = ?')= AMSDBI::st=HASH(0x1857ca4) at AMSDBI.pm line 203 T - FETCH('private_amsdbi_info')= undef at AMSDBI.pm line 204 T - STORE('private_amsdbi_info' HASH(0x10b5cb8))= 1 at AMSDBI.pm line 204 T - FETCH('private_amsdbi_info')= HASH(0x10b5cb8)1keys ('private_amsdbi_info' from cache) at AM T - FETCH('private_amsdbi_info')= HASH(0x10b5cb8)2keys ('private_amsdbi_info' from cache) at AM T - execute('3074952')= '0E0' at AMSDBI.pm line 319 T - fetchrow_array= ( '152899' ) [1 items] row1 at AMSDBI.pm line 336 T - finish= 1 at AMSDBI.pm line 353 T - DESTROY= undef at AMSSecurity.pm line 333 T - prepare('SELECT p_id FROM Membership WHERE member_id = ?')= AMSDBI::st=HASH(0x1940250) at AMSDBI.pm line 203 T - FETCH('private_amsdbi_info')= undef at AMSDBI.pm line 204 T - STORE('private_amsdbi_info' HASH(0x18e4780))= 1 at AMSDBI.pm line 204 T - FETCH('private_amsdbi_info')= HASH(0x18e4780)1keys ('private_amsdbi_info' from cache) at AM T - FETCH('private_amsdbi_info')= HASH(0x18e4780)2keys ('private_amsdbi_info' from cache) at AM T - execute('3074952')= '0E0' at AMSDBI.pm line 319 T - fetchrow_array= ( '152899' ) [1 items] row1 at AMSDBI.pm line 336 T - finish= 1 at AMSDBI.pm line 353 T - DESTROY= undef at AMSSecurity.pm line 333 T - commit= 1 at main.plex line 104 T - FETCH('Active')= '' at DBI.pm line 150 Tim Bunce wrote: On Wed, Aug 27, 2003 at 09:44:47PM -0400, Philip M. Gollucci wrote: I don't have the trace file handy, but the next time it happens, I can grab it and post it if needed. Won't get far without it. Tim.
Re: Supurious DBI error
On Thu, Aug 28, 2003 at 11:22:09AM -0400, Philip M. Gollucci wrote: Unless I'm mistaken, this is 2 runs through. The first fails with the error. The second works. Thanks in advance. Use a higher trace level, say 3, and post the trace from the last method that accessed the databases to the first that gets an error. Tim.
Apache::DBI error
I'm trying to update my Perl installation. It says a new Apache::DBI is out; 0.92. I've tried changing LANG from 'en_US.UTF-8' to 'en_US' and also just 'C' as I've seen that help before. I ran t/10mysql.t manually and it says it's failing because it gets the same connection both times. It's inspecting the 'mysql_thread_id' property of the DB handle returned by the connection. Apparently both threads are the same. Any ideas? Thanks, Greg Gregory L. Hering 4807 Bradford Drive Huntsville, AL 35805 (256) 722-6420
Re: Vague DBI Error
On Mon, Jun 09, 2003 at 04:50:18PM -0500, Stephen Clouse wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Jun 09, 2003 at 02:33:30PM -0700, Jamin Roth wrote: OK running dmesg shows that the OS is out of memory. When $sth-execute is run are all of the records returned? That would take out a ton of memory. It would not surprise me at all if MySQL was stupid enough to attempt this. It's not a question of stupidity, it's a very valid design choice that's part of MySQL's generally excellent performance. (Stupidity would be not reading the documentation ;-) Tim.
Re: Vague DBI Error
On Tue, Jun 10, 2003 at 10:18:30AM +0100, Tim Bunce wrote: On Mon, Jun 09, 2003 at 04:50:18PM -0500, Stephen Clouse wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Jun 09, 2003 at 02:33:30PM -0700, Jamin Roth wrote: OK running dmesg shows that the OS is out of memory. When $sth-execute is run are all of the records returned? That would take out a ton of memory. It would not surprise me at all if MySQL was stupid enough to attempt this. It's not a question of stupidity, it's a very valid design choice that's part of MySQL's generally excellent performance. (Stupidity would be not reading the documentation ;-) And of course doing so will tell you how you can turn it off. Which if you know you have a large dataset being returned, makes a lot of sense. Graham.
RE: Vague DBI Error
Your Terminated did not come from DBI. Your process got SIGTERM signal from some monitoring process or an administrator. -Original Message- From: Jamin Roth [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 7:28 PM To: [EMAIL PROTECTED] Subject: Vague DBI Error I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? Thank you for any help you can provide, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ #!/usr/bin/perl -w # # # # This Script performs a backup of the specified host # # use DBI; use DBD::mysql; $|=1; #$db= 'pathtracker'; $defaulthost= '192.168.50.215'; #turkey ip = 192.168.50.197 #pteranodon ip = 192.168.50.215 $port = 3306; $user = backup; $password = 12345; $dsn = ''; $dbh = ''; # Use standard comma for delimination $d = ,; sub BackupHost { # Send host my $host = $_[0]; $dsn = DBI:mysql:host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password) or die Can't connect to the database: $DBI::errstr\n;; # print Finding Databases for $host\n; my $SQLQuery = 'SHOW DATABASES'; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n;; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; while(my $databases = $sth-fetchrow_arrayref) { $database = $$databases[0]; print Performing backup of $database database on $host\n; $dsn = DBI:mysql:database=$database;host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password); # Backup each database in host BackupDatabase($host,$database); } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; $dbh-disconnect or warn Error disconnecting: $DBI::errstr\n; } sub BackupDatabase { # Send host and database my $host = $_[0]; my $database = $_[1]; my $SQLQuery = 'SHOW TABLES'; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; while(my $tables = $sth-fetchrow_arrayref) { $table = $$tables[0]; # Backup the table to CSV BackupTableToCSV($host,$database,$table); } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; } sub BackupTableToCSV { # Send host, database and table my $host = $_[0]; my $datbase = $_[1]; my $table = $_[2]; $outfile = $host\_$database\_$table.csv; open(OUTFILE, ${outfile}) || die Cannot open $outfile for output!\n; print Creating $outfile; # Print column names my $SQLQuery = SHOW COLUMNS FROM $table; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; my $row = $sth-fetchrow_arrayref(); my $line = ''; my $found = 0; foreach $field(@row) { if($found 0) {$line = $line.$d; } $line = $line.$field; $found = 1; } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; print OUTFILE $line.\n; # Print table contents $SQLQuery = SELECT * FROM $table; print Preparing $SQLQuery\n; $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; print Executing $SQLQuery\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; print which has .$sth-rows. lines\n; while($row = $sth-fetchrow_arrayref) { my $line = ''; my $found = 0; foreach my $field(@$row) { if($found 0) { $line = $line.$d; } if($field) { $line = $line.$field; }else{ $line = $line.NULL
Re: Vague DBI Error
How large did the file get when you were dumping 4.7 million rows? Did you exceed the max file size for your OS? Igor Korolev wrote: Your Terminated did not come from DBI. Your process got SIGTERM signal from some monitoring process or an administrator. -Original Message- From: Jamin Roth [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 7:28 PM To: [EMAIL PROTECTED] Subject: Vague DBI Error I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? Thank you for any help you can provide, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ #!/usr/bin/perl -w # # # # This Script performs a backup of the specified host # # use DBI; use DBD::mysql; $|=1; #$db= 'pathtracker'; $defaulthost= '192.168.50.215'; #turkey ip = 192.168.50.197 #pteranodon ip = 192.168.50.215 $port = 3306; $user = backup; $password = 12345; $dsn = ''; $dbh = ''; # Use standard comma for delimination $d = ,; sub BackupHost { # Send host my $host = $_[0]; $dsn = DBI:mysql:host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password) or die Can't connect to the database: $DBI::errstr\n;; # print Finding Databases for $host\n; my $SQLQuery = 'SHOW DATABASES'; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n;; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; while(my $databases = $sth-fetchrow_arrayref) { $database = $$databases[0]; print Performing backup of $database database on $host\n; $dsn = DBI:mysql:database=$database;host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password); # Backup each database in host BackupDatabase($host,$database); } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; $dbh-disconnect or warn Error disconnecting: $DBI::errstr\n; } sub BackupDatabase { # Send host and database my $host = $_[0]; my $database = $_[1]; my $SQLQuery = 'SHOW TABLES'; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; while(my $tables = $sth-fetchrow_arrayref) { $table = $$tables[0]; # Backup the table to CSV BackupTableToCSV($host,$database,$table); } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; } sub BackupTableToCSV { # Send host, database and table my $host = $_[0]; my $datbase = $_[1]; my $table = $_[2]; $outfile = $host\_$database\_$table.csv; open(OUTFILE, ${outfile}) || die Cannot open $outfile for output!\n; print Creating $outfile; # Print column names my $SQLQuery = SHOW COLUMNS FROM $table; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; my $row = $sth-fetchrow_arrayref(); my $line = ''; my $found = 0; foreach $field(@row) { if($found 0) {$line = $line.$d; } $line = $line.$field; $found = 1; } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; print OUTFILE $line.\n; # Print table contents $SQLQuery = SELECT * FROM $table; print Preparing $SQLQuery\n; $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; print Executing $SQLQuery\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; print which has .$sth-rows. lines\n; while($row = $sth-fetchrow_arrayref) { my $line = ''; my $found = 0; foreach my $field(@$row) { if($found 0) { $line = $line.$d; } if($field) { $line = $line.$field; }else
RE: Vague DBI Error
The die isn't run. I just get Terminiated in the middle of the script running -execute. This is what is frustrating. I ran DBI-Trace and this is what I got: Creating 192.168.50.215_pathtracker1_mnhtn_stats_detail.csv- prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SHOW COLUMNS FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x81b1374) at Backup.pl line 85 - execute for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_execute for 081b120c - dbd_st_execute 10 rows - execute= 10 at Backup.pl line 87 - fetchrow_arrayref for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_fetch for 081b120c, chopblanks 0 - dbd_st_fetch, 6 cols - fetchrow_arrayref= [ 'ID' 'bigint(20) unsigned' '' 'PRI' undef 'auto_increment' ] row1 at Backup.pl line 89 - $DBI::err (*) FETCH from lasth=HASH - $DBI::err= undef Preparing SELECT * FROM mnhtn_stats_detail - prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SELECT * FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x80637c4) at Backup.pl line 104 - DESTROY for DBD::mysql::st (DBI::st=HASH(0x8063644)~INNER) thr#804b3c0 - DESTROY= undef at Backup.pl line 106 Executing SELECT * FROM mnhtn_stats_detail - execute for DBD::mysql::st (DBI::st=HASH(0x80637c4)~0x806380c) thr#804b3c0 - dbd_st_execute for 08063878 Terminated Any Ideas would be great, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Michael A Chase [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 9:43 PM To: Jamin Roth; [EMAIL PROTECTED] Subject: Re: Vague DBI Error On Fri, 6 Jun 2003 17:27:30 -0700 Jamin Roth [EMAIL PROTECTED] wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? Splitting the table should not be necessary. I don't see any reason why 4.7 million rows should cause an early termination. More details in your die() arguments might help you figure out where the problem is occuring. You may simply have an invalid value returned by $sth-rows() before all rows have been fetched. More comments for tightening up the script are included below. #!/usr/bin/perl -w # # # # This Script performs a backup of the specified host # # use DBI; use DBD::mysql; # If a script won't run with 'use strict;', it needs to be fixed. use strict; $|=1; # I can see some sense having $d, $defaulthost, $port, $user, and # $password as file level variables because they never change # during a run. However they ought to be declared with 'my'. #$db= 'pathtracker'; $defaulthost= '192.168.50.215'; #turkey ip = 192.168.50.197 #pteranodon ip = 192.168.50.215 $port = 3306; $user = backup; $password = 12345; # These variables should be subroutine scoped variables. $dsn = ''; $dbh = ''; # Use standard comma for delimination $d = ,; sub BackupHost { # Send host # A list is easier to maintain than separate $_[x] assignments. my ( $host ) = @_; # my $host = $_[0]; $dsn = DBI:mysql:host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password) or die Can't connect to the database: $DBI::errstr\n;; # The second ';'s are redundant. # print Finding Databases for $host\n; my $SQLQuery = 'SHOW DATABASES'; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n;; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; # Using bind_columns() allows a much simpler loop structure. # It's also much more efficient. my $database; $sth - bind_columns( \$database ); while ( $sth - fetch ) { # while(my $databases = $sth-fetchrow_arrayref) { # $database = $$databases[0]; print Performing backup of $database database on $host\n; # There's no reason to generate $dsn here if you aren't # passing it to BackupDatabase(). $dsn = DBI:mysql:database=$database;host=$host;port=$port; # You should use a separate connection handle. The current $dbh
RE: Vague DBI Error
I've kinda-sorta been following this, so I don't know if you've answered these questions already. When trying to simulate similar behavior on my Linux box, I can generate the 'Terminated' message by sending the process a SIGTERM. I did this using a 'kill -15 pid' command, from another xterm. I imagine this would work on any Unix. I'm not familiar with the inner workings and hidden mechanisms of DBI, but I doubt it would generate a SIGTERM of its own volition. As previously mentioned, this sounds like it may be happening external to the process doing the export. That is, either another OS process is sending your process the SIGTERM, or the OS itself is sending it. I'm wondering if you can have better luck with an strace, rather than a DBI trace, since this seems to be an OS-related issue. Just a thought, Dave On Jun 9, Jamin Roth scribed: The die isn't run. I just get Terminiated in the middle of the script running -execute. This is what is frustrating. I ran DBI-Trace and this is what I got: Creating 192.168.50.215_pathtracker1_mnhtn_stats_detail.csv- prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SHOW COLUMNS FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x81b1374) at Backup.pl line 85 - execute for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_execute for 081b120c - dbd_st_execute 10 rows - execute= 10 at Backup.pl line 87 - fetchrow_arrayref for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_fetch for 081b120c, chopblanks 0 - dbd_st_fetch, 6 cols - fetchrow_arrayref= [ 'ID' 'bigint(20) unsigned' '' 'PRI' undef 'auto_increment' ] row1 at Backup.pl line 89 - $DBI::err (*) FETCH from lasth=HASH - $DBI::err= undef Preparing SELECT * FROM mnhtn_stats_detail - prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SELECT * FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x80637c4) at Backup.pl line 104 - DESTROY for DBD::mysql::st (DBI::st=HASH(0x8063644)~INNER) thr#804b3c0 - DESTROY= undef at Backup.pl line 106 Executing SELECT * FROM mnhtn_stats_detail - execute for DBD::mysql::st (DBI::st=HASH(0x80637c4)~0x806380c) thr#804b3c0 - dbd_st_execute for 08063878 Terminated Any Ideas would be great, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Michael A Chase [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 9:43 PM To: Jamin Roth; [EMAIL PROTECTED] Subject: Re: Vague DBI Error On Fri, 6 Jun 2003 17:27:30 -0700 Jamin Roth [EMAIL PROTECTED] wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? Splitting the table should not be necessary. I don't see any reason why 4.7 million rows should cause an early termination. More details in your die() arguments might help you figure out where the problem is occuring. You may simply have an invalid value returned by $sth-rows() before all rows have been fetched. More comments for tightening up the script are included below. #!/usr/bin/perl -w # # # # This Script performs a backup of the specified host # # use DBI; use DBD::mysql; # If a script won't run with 'use strict;', it needs to be fixed. use strict; $|=1; # I can see some sense having $d, $defaulthost, $port, $user, and # $password as file level variables because they never change # during a run. However they ought to be declared with 'my'. #$db= 'pathtracker'; $defaulthost= '192.168.50.215'; #turkey ip = 192.168.50.197 #pteranodon ip = 192.168.50.215 $port = 3306; $user = backup; $password = 12345; # These variables should be subroutine scoped variables. $dsn = ''; $dbh = ''; # Use standard comma for delimination $d = ,; sub BackupHost { # Send host # A list is easier to maintain than separate $_[x] assignments. my ( $host ) = @_; # my $host = $_[0]; $dsn = DBI:mysql:host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password) or die Can't connect
Re: Vague DBI Error
I agree. Tim. On Mon, Jun 09, 2003 at 01:42:20PM -0400, David N Murray wrote: I've kinda-sorta been following this, so I don't know if you've answered these questions already. When trying to simulate similar behavior on my Linux box, I can generate the 'Terminated' message by sending the process a SIGTERM. I did this using a 'kill -15 pid' command, from another xterm. I imagine this would work on any Unix. I'm not familiar with the inner workings and hidden mechanisms of DBI, but I doubt it would generate a SIGTERM of its own volition. As previously mentioned, this sounds like it may be happening external to the process doing the export. That is, either another OS process is sending your process the SIGTERM, or the OS itself is sending it. I'm wondering if you can have better luck with an strace, rather than a DBI trace, since this seems to be an OS-related issue. Just a thought, Dave On Jun 9, Jamin Roth scribed: The die isn't run. I just get Terminiated in the middle of the script running -execute. This is what is frustrating. I ran DBI-Trace and this is what I got: Creating 192.168.50.215_pathtracker1_mnhtn_stats_detail.csv- prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SHOW COLUMNS FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x81b1374) at Backup.pl line 85 - execute for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_execute for 081b120c - dbd_st_execute 10 rows - execute= 10 at Backup.pl line 87 - fetchrow_arrayref for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_fetch for 081b120c, chopblanks 0 - dbd_st_fetch, 6 cols - fetchrow_arrayref= [ 'ID' 'bigint(20) unsigned' '' 'PRI' undef 'auto_increment' ] row1 at Backup.pl line 89 - $DBI::err (*) FETCH from lasth=HASH - $DBI::err= undef Preparing SELECT * FROM mnhtn_stats_detail - prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SELECT * FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x80637c4) at Backup.pl line 104 - DESTROY for DBD::mysql::st (DBI::st=HASH(0x8063644)~INNER) thr#804b3c0 - DESTROY= undef at Backup.pl line 106 Executing SELECT * FROM mnhtn_stats_detail - execute for DBD::mysql::st (DBI::st=HASH(0x80637c4)~0x806380c) thr#804b3c0 - dbd_st_execute for 08063878 Terminated Any Ideas would be great, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Michael A Chase [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 9:43 PM To: Jamin Roth; [EMAIL PROTECTED] Subject: Re: Vague DBI Error On Fri, 6 Jun 2003 17:27:30 -0700 Jamin Roth [EMAIL PROTECTED] wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? Splitting the table should not be necessary. I don't see any reason why 4.7 million rows should cause an early termination. More details in your die() arguments might help you figure out where the problem is occuring. You may simply have an invalid value returned by $sth-rows() before all rows have been fetched. More comments for tightening up the script are included below. #!/usr/bin/perl -w # # # # This Script performs a backup of the specified host # # use DBI; use DBD::mysql; # If a script won't run with 'use strict;', it needs to be fixed. use strict; $|=1; # I can see some sense having $d, $defaulthost, $port, $user, and # $password as file level variables because they never change # during a run. However they ought to be declared with 'my'. #$db= 'pathtracker'; $defaulthost= '192.168.50.215'; #turkey ip = 192.168.50.197 #pteranodon ip = 192.168.50.215 $port = 3306; $user = backup; $password = 12345; # These variables should be subroutine scoped variables. $dsn = ''; $dbh = ''; # Use standard comma for delimination $d = ,; sub BackupHost { # Send host # A list is easier to maintain than separate $_[x
Re: Vague DBI Error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Jun 06, 2003 at 05:27:30PM -0700, Jamin Roth wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? If this is Linux, it sounds like the kernel OOM killer is sniping the process. Hopefully you're not trying to hold all those records in memory at once - -- Stephen Clouse [EMAIL PROTECTED] Senior Programmer/DBE, Core Technology Developer The IQ Group, Inc. http://www.theiqgroup.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+5Pg4A4aoazQ9p2cRAsk1AJ48gukiiX9gJX8gkNupUmTK58YdKgCg4J1b LKzYhEcTDG4YgAj8Dp6HeQ0= =j8yu -END PGP SIGNATURE-
RE: Vague DBI Error
I'm running on a FreeBSD box. MySQL is basically all it is running. Although the we used MySQL with Linux threads, but I don't think that would make too much of a difference in this case. Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Stephen Clouse [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 2:12 PM To: Jamin Roth Cc: [EMAIL PROTECTED] Subject: Re: Vague DBI Error -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Jun 06, 2003 at 05:27:30PM -0700, Jamin Roth wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? If this is Linux, it sounds like the kernel OOM killer is sniping the process. Hopefully you're not trying to hold all those records in memory at once - -- Stephen Clouse [EMAIL PROTECTED] Senior Programmer/DBE, Core Technology Developer The IQ Group, Inc. http://www.theiqgroup.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+5Pg4A4aoazQ9p2cRAsk1AJ48gukiiX9gJX8gkNupUmTK58YdKgCg4J1b LKzYhEcTDG4YgAj8Dp6HeQ0= =j8yu -END PGP SIGNATURE-
Re: Vague DBI Error
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Jun 09, 2003 at 02:20:18PM -0700, Jamin Roth wrote: read(3, \0074672773\027697898/23/01 4:04:57 PM..., 82) = 82 brk(0x2f339000) = 0x2f339000 --- SIGTERM (Terminated) --- +++ killed by SIGTERM +++ What does the brk command do? It extends the data memory segment for the process. Can I get more information as to why SIGTERM killed the script? You are most definitely running out of memory. - -- Stephen Clouse [EMAIL PROTECTED] Senior Programmer/DBE, Core Technology Developer The IQ Group, Inc. http://www.theiqgroup.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+5PxhA4aoazQ9p2cRAgP5AKCAWTZT5uzkqujVwN+FGins99FX8QCgjziH vBlHg/TRx1GqOR9wp28Q3Jc= =lwXA -END PGP SIGNATURE-
RE: Vague DBI Error
OK running dmesg shows that the OS is out of memory. When $sth-execute is run are all of the records returned? That would take out a ton of memory. Other then Limiting the amount of returned results does any one have any other ideas? Thanks, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Stephen Clouse [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 2:12 PM To: Jamin Roth Cc: [EMAIL PROTECTED] Subject: Re: Vague DBI Error -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Jun 06, 2003 at 05:27:30PM -0700, Jamin Roth wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? If this is Linux, it sounds like the kernel OOM killer is sniping the process. Hopefully you're not trying to hold all those records in memory at once - -- Stephen Clouse [EMAIL PROTECTED] Senior Programmer/DBE, Core Technology Developer The IQ Group, Inc. http://www.theiqgroup.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+5Pg4A4aoazQ9p2cRAsk1AJ48gukiiX9gJX8gkNupUmTK58YdKgCg4J1b LKzYhEcTDG4YgAj8Dp6HeQ0= =j8yu -END PGP SIGNATURE-
RE: Vague DBI Error
Here is the script from my previous question: #!/usr/bin/perl -w # # # # This Script performs a backup of the specified host # # use DBI; use DBD::mysql; $|=1; #$db= 'pathtracker1'; #$defaulthost = '192.168.50.215'; #turkey ip = 192.168.50.197 #pteranodon ip = 192.168.50.215 $port = 3306; $user = backup; $password = ; $dsn = ''; $dbh = ''; # Use standard comma for delimination $d = ,; my $host = '192.168.50.215'; my $database = 'pathtracker1'; my $table = 'mnhtn_stats_detail'; $dsn = DBI:mysql:database=$database;host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password,{RaiseError = 1,AutoCommit = 0}); $outfile = $host\_$database\_$table.csv; open(OUTFILE, ${outfile}) || die Cannot open $outfile for output!\n; print Creating $outfile; # Print column names my $SQLQuery = SHOW COLUMNS FROM $table; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; my $row = $sth-fetchrow_arrayref(); my $line = ''; my $found = 0; foreach $field(@row) { if($found 0) {$line = $line.$d; } $line = $line.$field; $found = 1; } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; print OUTFILE $line.\n; # Print table contents $SQLQuery = SELECT * FROM $table; print Preparing $SQLQuery\n; $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; print Executing $SQLQuery\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; print which has .$sth-rows. lines\n; while($row = $sth-fetchrow_arrayref) { my $line = ''; my $found = 0; foreach my $field(@$row) { if($found 0) { $line = $line.$d; } if($field) { $line = $line.$field; }else{ $line = $line.NULL; } $found = 1; } print OUTFILE $line.\n; } $dbh-disconnect or warn Error disconnecting: $DBI::errstr\n; Thanks, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Stephen Clouse [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 2:12 PM To: Jamin Roth Cc: [EMAIL PROTECTED] Subject: Re: Vague DBI Error -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Jun 06, 2003 at 05:27:30PM -0700, Jamin Roth wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? If this is Linux, it sounds like the kernel OOM killer is sniping the process. Hopefully you're not trying to hold all those records in memory at once - -- Stephen Clouse [EMAIL PROTECTED] Senior Programmer/DBE, Core Technology Developer The IQ Group, Inc. http://www.theiqgroup.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+5Pg4A4aoazQ9p2cRAsk1AJ48gukiiX9gJX8gkNupUmTK58YdKgCg4J1b LKzYhEcTDG4YgAj8Dp6HeQ0= =j8yu -END PGP SIGNATURE-
(Fwd) RE: Vague DBI Error
- Forwarded message from Jamin Roth [EMAIL PROTECTED] - Delivered-To: [EMAIL PROTECTED] From: Jamin Roth [EMAIL PROTECTED] To: Tim Bunce [EMAIL PROTECTED] Subject: RE: Vague DBI Error Date: Mon, 9 Jun 2003 14:18:12 -0700 Keywords: Sorted In-Reply-To: [EMAIL PROTECTED] Here is the last couple of lines of the strace output: read(3, V\0\0@, 4)= 4 read(3, \0074672767\027697898/23/01 4:04:57 PM..., 86) = 86 read(3, T\0\0A, 4)= 4 read(3, \0074672768\027697898/23/01 4:04:57 PM..., 84) = 84 read(3, V\0\0B, 4)= 4 read(3, \0074672769\027697898/23/01 4:04:57 PM..., 86) = 86 read(3, V\0\0C, 4)= 4 read(3, \0074672770\027697898/23/01 4:04:57 PM..., 86) = 86 read(3, U\0\0D, 4)= 4 read(3, \0074672771\027697898/23/01 4:04:57 PM..., 85) = 85 read(3, W\0\0E, 4)= 4 read(3, \0074672772\027697898/23/01 4:04:57 PM..., 87) = 87 read(3, R\0\0F, 4)= 4 read(3, \0074672773\027697898/23/01 4:04:57 PM..., 82) = 82 brk(0x2f339000) = 0x2f339000 --- SIGTERM (Terminated) --- +++ killed by SIGTERM +++ What does the brk command do? Can I get more information as to why SIGTERM killed the script? I think we are all on the right track here. I think I can start to see the end of the tunnel ahead. I just need a little bit more of a push. Thanks, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Tim Bunce [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 1:17 PM To: David N Murray Cc: Jamin Roth; DBI users Subject: Re: Vague DBI Error I agree. Tim. On Mon, Jun 09, 2003 at 01:42:20PM -0400, David N Murray wrote: I've kinda-sorta been following this, so I don't know if you've answered these questions already. When trying to simulate similar behavior on my Linux box, I can generate the 'Terminated' message by sending the process a SIGTERM. I did this using a 'kill -15 pid' command, from another xterm. I imagine this would work on any Unix. I'm not familiar with the inner workings and hidden mechanisms of DBI, but I doubt it would generate a SIGTERM of its own volition. As previously mentioned, this sounds like it may be happening external to the process doing the export. That is, either another OS process is sending your process the SIGTERM, or the OS itself is sending it. I'm wondering if you can have better luck with an strace, rather than a DBI trace, since this seems to be an OS-related issue. Just a thought, Dave On Jun 9, Jamin Roth scribed: The die isn't run. I just get Terminiated in the middle of the script running -execute. This is what is frustrating. I ran DBI-Trace and this is what I got: Creating 192.168.50.215_pathtracker1_mnhtn_stats_detail.csv- prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SHOW COLUMNS FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x81b1374) at Backup.pl line 85 - execute for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_execute for 081b120c - dbd_st_execute 10 rows - execute= 10 at Backup.pl line 87 - fetchrow_arrayref for DBD::mysql::st (DBI::st=HASH(0x81b1374)~0x8063644) thr#804b3c0 - dbd_st_fetch for 081b120c, chopblanks 0 - dbd_st_fetch, 6 cols - fetchrow_arrayref= [ 'ID' 'bigint(20) unsigned' '' 'PRI' undef 'auto_increment' ] row1 at Backup.pl line 89 - $DBI::err (*) FETCH from lasth=HASH - $DBI::err= undef Preparing SELECT * FROM mnhtn_stats_detail - prepare for DBD::mysql::db (DBI::db=HASH(0x81b12e4)~0x81b129c 'SELECT * FROM mnhtn_stats_detail') thr#804b3c0 Setting mysql_use_result to 0 - prepare= DBI::st=HASH(0x80637c4) at Backup.pl line 104 - DESTROY for DBD::mysql::st (DBI::st=HASH(0x8063644)~INNER) thr#804b3c0 - DESTROY= undef at Backup.pl line 106 Executing SELECT * FROM mnhtn_stats_detail - execute for DBD::mysql::st (DBI::st=HASH(0x80637c4)~0x806380c) thr#804b3c0 - dbd_st_execute for 08063878 Terminated Any Ideas would be great, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Michael A Chase [mailto:[EMAIL PROTECTED] Sent: Friday, June 06, 2003 9:43 PM To: Jamin Roth; [EMAIL PROTECTED] Subject: Re: Vague DBI Error On Fri, 6 Jun 2003 17:27:30 -0700 Jamin Roth [EMAIL PROTECTED] wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table
Re: Vague DBI Error
See details of the mysql_use_result attribute: http://search.cpan.org/author/JWIED/DBD-mysql-2.1027/lib/DBD/mysql.pod#STATEMENT_HANDLES Tim. On Mon, Jun 09, 2003 at 02:33:30PM -0700, Jamin Roth wrote: OK running dmesg shows that the OS is out of memory. When $sth-execute is run are all of the records returned? That would take out a ton of memory. Other then Limiting the amount of returned results does any one have any other ideas? Thanks, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ -Original Message- From: Stephen Clouse [mailto:[EMAIL PROTECTED] Sent: Monday, June 09, 2003 2:12 PM To: Jamin Roth Cc: [EMAIL PROTECTED] Subject: Re: Vague DBI Error -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, Jun 06, 2003 at 05:27:30PM -0700, Jamin Roth wrote: I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? If this is Linux, it sounds like the kernel OOM killer is sniping the process. Hopefully you're not trying to hold all those records in memory at once - -- Stephen Clouse [EMAIL PROTECTED] Senior Programmer/DBE, Core Technology Developer The IQ Group, Inc. http://www.theiqgroup.com/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.7 (GNU/Linux) iD8DBQE+5Pg4A4aoazQ9p2cRAsk1AJ48gukiiX9gJX8gkNupUmTK58YdKgCg4J1b LKzYhEcTDG4YgAj8Dp6HeQ0= =j8yu -END PGP SIGNATURE-
Vague DBI Error
I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? Thank you for any help you can provide, Jamin Roth Systems/Network Administrator Sorensen Associates Inc Phone: (503) 665-0123 ext 234 Fax: (503) 666-5113 http://www.sorensen-associates.com/ #!/usr/bin/perl -w # # # # This Script performs a backup of the specified host # # use DBI; use DBD::mysql; $|=1; #$db= 'pathtracker'; $defaulthost= '192.168.50.215'; #turkey ip = 192.168.50.197 #pteranodon ip = 192.168.50.215 $port = 3306; $user = backup; $password = 12345; $dsn = ''; $dbh = ''; # Use standard comma for delimination $d = ,; sub BackupHost { # Send host my $host = $_[0]; $dsn = DBI:mysql:host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password) or die Can't connect to the database: $DBI::errstr\n;; # print Finding Databases for $host\n; my $SQLQuery = 'SHOW DATABASES'; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n;; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; while(my $databases = $sth-fetchrow_arrayref) { $database = $$databases[0]; print Performing backup of $database database on $host\n; $dsn = DBI:mysql:database=$database;host=$host;port=$port; $dbh = DBI-connect($dsn,$user,$password); # Backup each database in host BackupDatabase($host,$database); } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; $dbh-disconnect or warn Error disconnecting: $DBI::errstr\n; } sub BackupDatabase { # Send host and database my $host = $_[0]; my $database = $_[1]; my $SQLQuery = 'SHOW TABLES'; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; while(my $tables = $sth-fetchrow_arrayref) { $table = $$tables[0]; # Backup the table to CSV BackupTableToCSV($host,$database,$table); } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; } sub BackupTableToCSV { # Send host, database and table my $host = $_[0]; my $datbase = $_[1]; my $table = $_[2]; $outfile = $host\_$database\_$table.csv; open(OUTFILE, ${outfile}) || die Cannot open $outfile for output!\n; print Creating $outfile; # Print column names my $SQLQuery = SHOW COLUMNS FROM $table; my $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; my $row = $sth-fetchrow_arrayref(); my $line = ''; my $found = 0; foreach $field(@row) { if($found 0) {$line = $line.$d; } $line = $line.$field; $found = 1; } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; print OUTFILE $line.\n; # Print table contents $SQLQuery = SELECT * FROM $table; print Preparing $SQLQuery\n; $sth = $dbh-prepare($SQLQuery) or die Can't prepare SQL statement: $DBI::errstr\n; print Executing $SQLQuery\n; $sth-execute() or die Can't execute SQL statement: $DBI::errstr\n;; print which has .$sth-rows. lines\n; while($row = $sth-fetchrow_arrayref) { my $line = ''; my $found = 0; foreach my $field(@$row) { if($found 0) { $line = $line.$d; } if($field) { $line = $line.$field; }else{ $line = $line.NULL; } $found = 1; } print OUTFILE $line.\n; } warn Data fetching terminated early by error: $DBI::errstr\n if $DBI::err; close(OUTFILE); $sth-finish; } # Loop through command
Re: Vague DBI Error
On Fri, 6 Jun 2003, Jamin Roth wrote: Date: Fri, 6 Jun 2003 17:27:30 -0700 From: Jamin Roth [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Vague DBI Error I designed a simple script to backup my MySQL databases. Basically it loops through all the databases then through each table. This section of code retreives the table and writes it to a csv file. When I execute the code at the end of this message on a table with 2.7 million rows it works fine. When it's executed on 4.7 million rows it exits out with only Terminated as the error message. Is there any way I can get more information about what is going on? Could MySQL be timing out? Should I split up the table if it is over 2.5 million records (just do a limit in the SQL statement)? Thank you for any help you can provide, There should(I hope) be no need to split up the result set, but I can't think of what would be causing your problem. When do you get the error? When you call execute(), or in the middle of the fetch? If so how many rows were fetched before it dies? c. c. c. DBI-trace(2) will tell you what DBI is doing, but it will generate *much* data if you try running it on 2+ M rows. Also, Take a look at 'SELECT ... INTO OUTFILE ... ' this might get you where you want to go a bit faster and easier, but if you stick with perl, I'd suggest looking at TEXT::CSV_XS which is much better than trying to hand-roll the csv generation. -r
Re: DBI error handling
Howdy! On Tue, Feb 25, 2003 at 09:46:07PM +, Tim Bunce wrote: On Tue, Feb 25, 2003 at 03:14:24PM -0500, Michael Houghton wrote: Howdy! I'm trying to write a WARN handler for an Informix application. I want to be able to get to stuff in the SQLCA, which, if I read things correctly, means I need the statement handle for the offending action. I have not figured out how to get that without resorting to a global- like variable. Is there some secret handshake that will let me obtain the last statement handle that was invoked? $DBI::lasth will give you the last handle used to make a DBI call. But if that was a statement handle that's now been destroyed it'll return the parent dbh instead. I had seen that variable, but had not yet researched it's use, etc. It sounds like exactly what I want; I think the statement handle wil still be valid when I am in the WARN handler (since I am looking to use PrintError to get me there). Thanks! I'll give this a shot. yours, Michael -- Michael and MJ Houghton | Herveus d'Ormonde and Megan O'Donnelly [EMAIL PROTECTED] | White Wolf and the Phoenix Bowie, MD, USA| Tablet and Inkle bands, and other stuff | http://www.radix.net/~herveus/
DBI error handling
Howdy! I'm trying to write a WARN handler for an Informix application. I want to be able to get to stuff in the SQLCA, which, if I read things correctly, means I need the statement handle for the offending action. I have not figured out how to get that without resorting to a global- like variable. Is there some secret handshake that will let me obtain the last statement handle that was invoked? I've looked at the Cheetah book, scanned the last couple months of the archives here, checked dbi.perl.org (or was it .com?), and given the source a (very) cursory overlook, all to no avail. I'd be grateful for clues and pointers to clues. Thanks. yours, Michael -- Michael and MJ Houghton | Herveus d'Ormonde and Megan O'Donnelly [EMAIL PROTECTED] | White Wolf and the Phoenix Bowie, MD, USA| Tablet and Inkle bands, and other stuff | http://www.radix.net/~herveus/
Re: DBI error handling
Michael Houghton wrote: I'm trying to write a WARN handler for an Informix application. I want to be able to get to stuff in the SQLCA, which, if I read things correctly, means I need the statement handle for the offending action. I have not figured out how to get that without resorting to a global- like variable. Is there some secret handshake that will let me obtain the last statement handle that was invoked? I've looked at the Cheetah book, scanned the last couple months of the archives here, checked dbi.perl.org (or was it .com?), and given the source a (very) cursory overlook, all to no avail. I'd be grateful for clues and pointers to clues. There are 5 tests in the t directory for DBD::Informix which mess with WARN handlers, but none do exactly what you want. However, if you can set your warning handler locally, can't you use Perl's anonymous subs to deal with it? $SIG{__WARN__} = sub { do_the_real_job($sth, $_[0]); }; $sth-... $SIG{__WARN__} = 'DEFAULT'; When the handler sub is executed, doesn't this use the $sth in scope when the sub is defined? That's an unverified hypothesis... -- Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) #include disclaimer.h Guardian of DBD::Informix 1.04.PC1 -- http://dbi.perl.org/
DBI Error
I am running this simple script on HP UX 11.0 (64 BIT) . The database is Oracle 9.2.0 #!/opt/perl5.6.1/bin/perl use DBI; print hello\n ; $dbh = DBI-connect(mydb,scott,tiger,'Oracle') ; I am getting this error install_driver(Oracle) failed: Can't load '/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file or dire ctory at /opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected Could somebody help ? Thanks Sanjay
Re: DBI Error
On Sat, 17 Aug 2002 23:09:30 -0400 WAZA,SANJAY (Non-HP-PaloAlto,ex1) [EMAIL PROTECTED] wrote: I am running this simple script on HP UX 11.0 (64 BIT) . The database is Oracle 9.2.0 #!/opt/perl5.6.1/bin/perl #!/opt/perl5.6.1/bin/perl -w use DBI; # -w and 'use strict;' show you small problems before they become big ones use strict; print hello\n ; $dbh = DBI-connect(mydb,scott,tiger,'Oracle') ; # You _really_ need to check for errors. # run `perldoc DBI` to see the newer (5 years old) connect() syntax my $dbh = DBI - connect( dbi:Oracle:mydb, scott, tiger, { PrintError = 0, RaiseError = 1, AutoCommit = 0 } ); I am getting this error install_driver(Oracle) failed: Can't load '/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file or dire ctory at /opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected Did you read the error message? If Oracle.sl is in the directory mentioned, then one of the shared libraries it calls could not be found, probably OCI.sl or something similar which is normally in $ORACLE_HOME/lib . Shared libraries are usually located via LD_LIBRARY_PATH which _MUST_ be set before the Perl interpreter starts. Oracle.sl is an exception since it must be in a known location relative to DBD/Oracle.pm. Another environment variable that should be set before the script starts is ORACLE_HOME. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
Re: DBI Error
On Sun, 18 Aug 2002 13:23:28 -0400 WAZA,SANJAY (Non-HP-PaloAlto,ex1) [EMAIL PROTECTED] wrote: I changed the script as you suggested #!/opt/perl5.6.1/bin/perl -w use strict; use DBI; my $dbh = DBI-connect( 'dbi:Oracle:p1db', 'partner1', 'p1admin', { RaiseError = 1, AutoCommit = 0 } ) || die Database connection not made: $DBI::errstr; If I want a custom error message I normally use { PrintError = 0, RaiseError = 0, AutoCommit = 0 } and then set $dbh - {RaiseError} to 1 after connect(). Otherwise, connect() never returns on error. I normally use something like Can't connect to $sInst as $sUser, $DBI::errstr\n. It may not be necessary for you though, since the instance and username have been added to the RaiseError message in recent versions of DBI. The Error is still the same . install_driver(Oracle) failed: Can't load '/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file or dire ctory at /opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expected Before Running the script I set up all the env valiables export ORACLE_HOME=/archive/newdisk/oracle9i export SHLIB_PATH=/opt/perl5.6.1/lib:$ORACLE_HOME/lib:/usr/lib export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/Apache/Apache/libexec export PERL5LIB=/opt/perl5.6.1/lib/site_perl/5.6.1:/opt/perl5.6.1/lib/5.6.1: /opt/perl5.6.1/lib/5.6.1/PA-RISC2.0:/opt/perl5.6.1/lib/site_perl/5.6.1/PA -RISC2.0 That all looks reasonable, but now I'm wondering what version of Oracle DBD::Oracle was compiled against. If it wasn't 9.0, you will need to get it rebuild with 9.0 or use an Oracle Home of the appropriate version. Since Oracle OCI (used by DBD::Oracle) normally connects through SQL*Net, you can connect to any database from 7 through 9 using a SQL*Net client of the version you compiled DBD::Oracle against, if you try to use another version it probably won't work. The File Oracle.sl is present in that directory boi307@/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle% ll total 12976 -rwxr-xr-x 1 binbin 0 Feb 1 2002 Oracle.bs -rwxr-xr-x 1 binbin 2402 May 2 2000 Oracle.h -rwxr-xr-x 1 binbin6602752 Feb 1 2002 Oracle.sl -rwxr-xr-x 1 binbin 9868 Aug 30 2001 dbdimp.h -rwxr-xr-x 1 binbin 15733 Feb 1 2002 mk.pm -rwxr-xr-x 1 binbin 11204 Aug 30 2001 ocitrace.h Next went to ORACLE_HOME/lib and did ll *oc* and got these results boi307@/archive/newdisk/oracle9i/lib% ll *oc* lrwxrwxr-x 1 oracle dba 14 Aug 6 12:50 libocci.sl - libocci.sl.9.0 -rwxr-xr-x 1 oracle dba 953832 Apr 27 11:12 libocci.sl.9.0 -rw-r--r-- 1 oracle dba4549378 Apr 27 07:36 libocci9.a -rw-r--r-- 1 oracle dba 211302 Apr 26 04:01 libocijdbc9.a -rwxr-xr-x 1 oracle dba 155248 Apr 27 12:50 libocijdbc9.sl -rwxr-xr-x 1 oracle dba 188120 Apr 27 12:50 libocijdbc9_g.sl -rw-r--r-- 1 oracle dba 211302 Apr 26 04:01 libocijdbcst9.a So I am not sure how to find exactly which shared library it is looking for? _IF_ DBD::Oracle was built with Oracle 9.0, it is probably wants libocci.sl or libocci.sl.9.0 linked via libocci9.a. If it was build with another version of Oracle, it is probably looking for another shared library which would exist in $ORACLE_HOME/lib in an Oracle instance of the correct version. -- Mac :}) ** I normally forward private questions to the appropriate mail list. ** Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
RE: DBI Error
/lib/Oraperl.pm /bin/perl -p -e s/~DRIVER~/Oracle/g /opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI/Driver.xst Oracle.xsi /bin/perl -I/opt/perl5.6.1/lib/5.6.1/PA-RISC2.0 -I/opt/perl5.6.1/lib/5.6.1 /opt/perl5.6.1/lib/5.6.1/ExtUtils/xsubpp -typemap /opt/perl5.6.1/lib/5.6.1/E xtUtils/typemap Oracle.xs Oracle.xsc mv Oracle.xsc Oracle.c cc -c -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/public -I/archive/newdisk/oracle9i/plsql/public -I/archive/newdisk/oracle 9i/network/public -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/demo -I/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI -D_HPUX _SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ae -O -DVERSION=\1.12\ -DXS_VERSION=\1.12\ +z -I/opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/CORE Oracle.c cc -c -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/public -I/archive/newdisk/oracle9i/plsql/public -I/archive/newdisk/oracle 9i/network/public -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/demo -I/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI -D_HPUX _SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ae -O -DVERSION=\1.12\ -DXS_VERSION=\1.12\ +z -I/opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/CORE dbdimp.c cc -c -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/public -I/archive/newdisk/oracle9i/plsql/public -I/archive/newdisk/oracle 9i/network/public -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/demo -I/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI -D_HPUX _SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ae -O -DVERSION=\1.12\ -DXS_VERSION=\1.12\ +z -I/opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/CORE oci7.c cc -c -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/public -I/archive/newdisk/oracle9i/plsql/public -I/archive/newdisk/oracle 9i/network/public -I/archive/newdisk/oracle9i/rdbms/demo -I/archive/newdisk/oracle9i/rdbms/demo -I/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBI -D_HPUX _SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Ae -O -DVERSION=\1.12\ -DXS_VERSION=\1.12\ +z -I/opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/CORE oci8.c cc: oci8.c, line 267: warning 604: Pointers are not assignment-compatible. Running Mkbootstrap for DBD::Oracle () chmod 644 Oracle.bs rm -f blib/arch/auto/DBD/Oracle/Oracle.sl LD_RUN_PATH=/archive/newdisk/oracle9i/lib ld -b +vnocompatwarnings -L/usr/local/lib Oracle.o dbdimp.o oci7.o oci8.o /archive/newdisk/oracle9i/rdbm s/lib/defopt.o -o blib/arch/auto/DBD/Oracle/Oracle.sl -L/archive/newdisk/oracle9i/lib/ -lclntsh -lcl -lrt -lpthread -ldld -lm -lqsmashr ld: /archive/newdisk/oracle9i/rdbms/lib/defopt.o: Mismatched ABI. 64-bit PA object file found in 32-bit link. *** Error exit code 1 Stop. *** If you have problems... read all the log printed above, and the README and README.help files. (Of course, you have read README by now anyway, haven't you?) So I did file /archive/newdisk/oracle9i/rdbms/lib/defopt.o Here are the results /archive/newdisk/oracle9i/rdbms/lib/defopt.o: ELF-64 relocatable object file - PA-RISC 2.0 (LP64) So it is a 64 Bit Object . Does this mean cc is 32 bit ? I am not sure why i am getting Mismatched ABI. 64-bit PA object file found in 32-bit link. Or do I need to rebuild Perl with +z flag option ? Thanks Much Appreciated your help Sanjay -Original Message- From: Michael A Chase [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 18, 2002 12:20 PM To: WAZA, SANJAY (Non-HP-PaloAlto, ex1); [EMAIL PROTECTED] Cc: GANESAN, MAYA (HP-SantaClara, ex4); RAMAN, SETHU (Non-HP-SantaClara, ex2) Subject: Re: DBI Error On Sun, 18 Aug 2002 13:23:28 -0400 WAZA,SANJAY (Non-HP-PaloAlto,ex1) [EMAIL PROTECTED] wrote: I changed the script as you suggested #!/opt/perl5.6.1/bin/perl -w use strict; use DBI; my $dbh = DBI-connect( 'dbi:Oracle:p1db', 'partner1', 'p1admin', { RaiseError = 1, AutoCommit = 0 } ) || die Database connection not made: $DBI::errstr; If I want a custom error message I normally use { PrintError = 0, RaiseError = 0, AutoCommit = 0 } and then set $dbh - {RaiseError} to 1 after connect(). Otherwise, connect() never returns on error. I normally use something like Can't connect to $sInst as $sUser, $DBI::errstr\n. It may not be necessary for you though, since the instance and username have been added to the RaiseError message in recent versions of DBI. The Error is still the same . install_driver(Oracle) failed: Can't load '/opt/perl5.6.1/lib/site_perl/5.6.1/PA-RISC2.0/auto/DBD/Oracle/Oracle.sl' for module DBD::Oracle: No such file or dire ctory at /opt/perl5.6.1/lib/5.6.1/PA-RISC2.0/DynaLoader.pm line 206. at (eval 1) line 3
DBI Error
I have Red Hat 7.2 I already Install DBI, DBD::Pg but I get this error Can't locate loadable object for module DBI in INC (INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 223 BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 223. Someone can help me please Atte. Aguztyn Garcia
Re: DBI Error
Your DBI have error in line 223. check it, may be permition problem.. On 17 Apr 2002 21:08:07 -0500 Aguztyn Garcia-Cruz [EMAIL PROTECTED] wrote: I have Red Hat 7.2 I already Install DBI, DBD::Pg but I get this error Can't locate loadable object for module DBI in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 223 BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 223. Someone can help me please Atte. Aguztyn Garcia
RE: DBI Error
Did you install it under the same perl that you are running the script with? If you have two or more perl installs on that machine, that might of been the problem. Make sure you install and use the same one (ie, use full path). Ilya -Original Message- From: Aguztyn Garcia-Cruz To: [EMAIL PROTECTED] Sent: 4/17/02 8:08 PM Subject: DBI Error I have Red Hat 7.2 I already Install DBI, DBD::Pg but I get this error Can't locate loadable object for module DBI in @INC (@INC contains: /usr/lib/perl5/5.6.1/i386-linux /usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i386-linux /usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 223 BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 223. Someone can help me please Atte. Aguztyn Garcia
Re: DBI error
See http://www.gossamer-threads.com/forum/Products_C9/Gossamer_Mail_C3/Gossamer_Mail_Discussion_F11/DBI_Confusion_P151183/ for one discussion of a similar error message. (Otherwise have you loaded Apache::DBI before DBI in your config/startup files? If not you may have problems?) HTH Henry --- Wolfgang Schwurack [EMAIL PROTECTED] wrote: Has anyone seen this error and if so how can the problem be corrected OS = Solaris Database = Mysql Can't locate object method connect via package Apache::DBI at /opt/gnu/perl5.005_03/lib/site_perl/5.005/sun4-solaris-thread/DBI.pm line 416. Thanks -- Wolfgang Schwurack Unix System Administrator University of Utah/Utah Education Network Tel: (801) 587-9444 __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com
DBI error on Solaris x86
Hi All, I've gone through the process of installing demarc, a front end for snort IDS and have it running with apache + mod_ssl + mod_perl on port 443 on my Solaris x86 server However, when I attempt an https connection to the server, I get the following error message in my apache error log file: [Tue Mar 5 18:25:15 2002] [error] Can't load '/usr/local/lib/perl5/site_perl/5005/i86pc-solaris/auto/DBI/DBIso' for module DBI: ldso1: /usr/local/www/bin/httpd: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5005/i86pc-solaris/auto/DBI/DBIso: symbol main: referenced symbol not found at /usr/local/lib/perl5/500503/i86pc-solaris/DynaLoaderpm line 169 at /usr/local/lib/perl5/site_perl/5005/i86pc-solaris/DBIpm line 223 BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5005/i86pc-solaris/DBIpm line 223 BEGIN failed--compilation aborted at /usr/local/demarc/cgi/demarc line 70 I've installed the latest DBD::Mysql and DBI I'm running the following versions of programs: Solaris 27 x86 mysql-32349 DBD-mysql-21011 DBI-121 Msql-Mysql-modules-12219 apache_1323 mod_ssl-287-1323 mod_perl-126 gcc-2952 Perl 5005_03 Any hints on what might be the issue? I'm running out of options Thanks! -- steve A make test with DBD also fails miserably, though I've installed it anyways make test PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/500503/i86pc-solaris -I/usr/local/lib/perl5/500503 -e 'use Test::Harness qw(runtests $verbose); $verbose=0; runtests ARGV;' t/*t t/00baseinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysqlso' for module DBD::mysql: ldso1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysqlso: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/500503/i86pc-solaris/DynaLoaderpm line 169 at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/00baset line 38 dubious Test returned status 255 (wstat 65280, 0xff00) DIED FAILED tests 4-5 Failed 2/5 tests, 6000% okay t/10dsnlistinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysqlso' for module DBD::mysql: ldso1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysqlso: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/500503/i86pc-solaris/DynaLoaderpm line 169 at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/10dsnlistt line 45 dubious Test returned status 255 (wstat 65280, 0xff00) DIED FAILED tests 1-3 Failed 3/3 tests, 000% okay t/20createdropinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysqlso' for module DBD::mysql: ldso1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysqlso: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/500503/i86pc-solaris/DynaLoaderpm line 169 at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/20createdropt line 45 dubious Test returned status 255 (wstat 65280, 0xff00) DIED FAILED tests 1-5 Failed 5/5 tests, 000% okay t/30insertfetchinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysqlso' for module DBD::mysql: ldso1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysqlso: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/500503/i86pc-solaris/DynaLoaderpm line 169 at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/30insertfetcht line 48 dubious Test returned status 255 (wstat 65280, 0xff00) DIED FAILED tests 1-11 Failed 11/11 tests, 000% okay t/40bindparaminstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysqlso' for module DBD::mysql: ldso1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysqlso: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/500503/i86pc-solaris/DynaLoaderpm line 169 at (eval 3) line 3 Perhaps a required shared library or dll isn't installed where expected at t/40bindparamt line 64 dubious Test returned status 255 (wstat 65280, 0xff00) DIED FAILED tests 1-28 Failed 28/28 tests, 000% okay t/40blobsinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysqlso' for module DBD::mysql: ldso1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysqlso: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/500503/i86pc-solaris/DynaLoaderpm line 169 at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/40blobst line 68 dubious Test returned status 255 (wstat 65280, 0xff00) DIED FAILED tests 1-11 Failed 11/11 tests, 000% okay t/40listfieldsinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysqlso' for module DBD::mysql: ldso1: /bin/perl:
RE: DBI error on Solaris x86
Found this in the DBI docs... --- If you get an error like fatal: relocation error: symbol not found: using gcc 3.x then try not using GNU as or GNU ld on Solaris. I will try some other version of ld. -- steve -Original Message- From: Stephen Gill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 6:18 AM To: '[EMAIL PROTECTED]' Subject: DBI error on Solaris x86 Importance: High Hi All, I've gone through the process of installing demarc, a front end for snort IDS and have it running with apache + mod_ssl + mod_perl on port 443 on my Solaris x86 server. However, when I attempt an https connection to the server, I get the following error message in my apache error log file: [Tue Mar 5 18:25:15 2002] [error] Can't load '/usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/auto/DBI/DBI.so' for module DBI: ld.so.1: /usr/local/www/bin/httpd: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/auto/DBI/DBI.so: symbol main: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/DBI.pm line 223 BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/DBI.pm line 223. BEGIN failed--compilation aborted at /usr/local/demarc/cgi/demarc line 70. I've installed the latest DBD::Mysql and DBI. I'm running the following versions of programs: Solaris 2.7 x86 mysql-3.23.49 DBD-mysql-2.1011 DBI-1.21 Msql-Mysql-modules-1.2219 apache_1.3.23 mod_ssl-2.8.7-1.3.23 mod_perl-1.26 gcc-2.95.2 Perl 5.005_03 Any hints on what might be the issue? I'm running out of options... Thanks! -- steve A make test with DBD also fails miserably, though I've installed it anyways. make test PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.00503/i86pc-solaris -I/usr/local/lib/perl5/5.00503 -e 'use Test::Harness qw(runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/00baseinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/00base.t line 38 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 4-5 Failed 2/5 tests, 60.00% okay t/10dsnlist.install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/10dsnlist.t line 45 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-3 Failed 3/3 tests, 0.00% okay t/20createdrop..install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/20createdrop.t line 45 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-5 Failed 5/5 tests, 0.00% okay t/30insertfetch.install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/30insertfetch.t line 48 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/40bindparam...install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 3) line 3 Perhaps a required shared library or dll isn't installed where expected at t/40bindparam.t line 64 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-28 Failed 28/28 tests, 0.00% okay t/40blobs...install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal
RE: DBI error on Solaris x86
Using a non-GNU ld does not seem to fix the problem. Still getting the same errors. Any ideas? (/usr/ucb/ld). -- steve -Original Message- From: Stephen Gill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 6:21 AM To: 'Stephen Gill'; '[EMAIL PROTECTED]' Subject: RE: DBI error on Solaris x86 Found this in the DBI docs... --- If you get an error like fatal: relocation error: symbol not found: using gcc 3.x then try not using GNU as or GNU ld on Solaris. I will try some other version of ld. -- steve -Original Message- From: Stephen Gill [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 6:18 AM To: '[EMAIL PROTECTED]' Subject: DBI error on Solaris x86 Importance: High Hi All, I've gone through the process of installing demarc, a front end for snort IDS and have it running with apache + mod_ssl + mod_perl on port 443 on my Solaris x86 server. However, when I attempt an https connection to the server, I get the following error message in my apache error log file: [Tue Mar 5 18:25:15 2002] [error] Can't load '/usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/auto/DBI/DBI.so' for module DBI: ld.so.1: /usr/local/www/bin/httpd: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/auto/DBI/DBI.so: symbol main: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/DBI.pm line 223 BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/5.005/i86pc-solaris/DBI.pm line 223. BEGIN failed--compilation aborted at /usr/local/demarc/cgi/demarc line 70. I've installed the latest DBD::Mysql and DBI. I'm running the following versions of programs: Solaris 2.7 x86 mysql-3.23.49 DBD-mysql-2.1011 DBI-1.21 Msql-Mysql-modules-1.2219 apache_1.3.23 mod_ssl-2.8.7-1.3.23 mod_perl-1.26 gcc-2.95.2 Perl 5.005_03 Any hints on what might be the issue? I'm running out of options... Thanks! -- steve A make test with DBD also fails miserably, though I've installed it anyways. make test PERL_DL_NONLAZY=1 /bin/perl -Iblib/arch -Iblib/lib -I/usr/local/lib/perl5/5.00503/i86pc-solaris -I/usr/local/lib/perl5/5.00503 -e 'use Test::Harness qw(runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/00baseinstall_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/00base.t line 38 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 4-5 Failed 2/5 tests, 60.00% okay t/10dsnlist.install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/10dsnlist.t line 45 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-3 Failed 3/3 tests, 0.00% okay t/20createdrop..install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/20createdrop.t line 45 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-5 Failed 5/5 tests, 0.00% okay t/30insertfetch.install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 1) line 3 Perhaps a required shared library or dll isn't installed where expected at t/30insertfetch.t line 48 dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1-11 Failed 11/11 tests, 0.00% okay t/40bindparam...install_driver(mysql) failed: Can't load 'blib/arch/auto/DBD/mysql/mysql.so' for module DBD::mysql: ld.so.1: /bin/perl: fatal: relocation error: file blib/arch/auto/DBD/mysql/mysql.so: symbol mysql_store_result: referenced symbol not found at /usr/local/lib/perl5/5.00503/i86pc-solaris/DynaLoader.pm line 169. at (eval 3) line 3 Perhaps a required shared library or dll isn't installed
Re: DBI error on Solaris x86
Using a non-GNU ld does not seem to fix the problem. Still getting the same errors. Any ideas? (/usr/ucb/ld). That should be /usr/ccs/bin/ld. Reading specs from /opt/gnu/lib/gcc-lib/i386-pc-solaris2.7/2.95.3/specs $ gcc -v gcc version 2.95.3 20010315 (release) $ ldd /opt/perl/lib/site_perl/5.005/i86pc-solaris/auto/DBI/DBI.so libc.so.1 = /usr/lib/libc.so.1 libdl.so.1 =/usr/lib/libdl.so.1 Can your gcc build hello world? Did you build your perl from source? John [EMAIL PROTECTED]
DBI ERROR Detection
I have a question/problem about dbi... I am working with a db2 database ... It appears that on certain circumstances, dbi does not return a return code and set an error. Specifically when I try to select, update or delete a record with an invalid key, no return code or return str is set. For example if I try to query a record with an invalid key, I should get an rc of 100 (no rows found). I do get an error if I have a hard error i.e. ( database is down, invalid sql statement and if I try to insert a record with a duplicate key that is referenced by a primary unique index I have tried both settings for raise_error and print_error... neither setting will have dbi return a code. I have also tried to eliminate the die clause on the execute statement with no effect I have also tried to use sth-rows, and that returns a -1 for no rows, or when a single row is found... Could any one help...
Re: MySQL DBI Error
On Mon, Jan 07, 2002 at 01:13:50PM +0600, Alex Gerasev wrote: $sql_statement = INSERT INTO rxPkt VALUES(\'$nodeId\', \'$rxNetTime\', \'$rxLat\', \'$rxLon\', \'$rxHeading\', \'$antIndex\', \'$rxPower\', \'$bin_msg\'); The best way to do this is use placeholders. In your example above, if any of the variables contains double quotes perl may interpret that as end of the string (and thus you'll have incorrect SQL statement). If variable contains single quote, MySQL will interpret that incorrectly. A variable containing a double quote will not cause a problem in either Perl or MySQL. Please try the following: $dbh-do(q{ INSERT INTO rxPkt VALUES (?, ?, ?, ?, ?, ?, ?, ?) }, undef, $nodeId, $rxNetTime, $rxLat, $rxLon, $rxHeading, $antIndex, $rxPower, $bin_msg ); This is equivalent to: $sth = $dbh-prepare(q{ INSERT INTO rxPkt VALUES (?, ?, ?, ?, ?, ?, ?, ?) }); $sth-execute($nodeId, $rxNetTime, $rxLat, $rxLon, $rxHeading, $antIndex, $rxPower, $bin_msg); Using placeholders is a common practice. It makes code more readable and helps you avoid errors. For more information on using placeholders, read perldoc DBI. Very good advice. Ronald
MySQL DBI Error
All - I'm using ActiveState, MySQL, and Win2k. I'm trying to insert data into the following table: +--+-+--+-+-+---+ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-+---+ | nodeID | tinyint(3) unsigned | YES | | NULL| | | rxNetTime| mediumint(9)| YES | | NULL| | | radioLat | float | YES | | NULL| | | radioLon | float | YES | | NULL| | | radioHeading | float | YES | | NULL| | | antIndex | tinyint(3) unsigned | YES | | NULL| | | rxPower | tinyint(3) unsigned | YES | | NULL| | | dataRecord | blob| YES | | NULL| | +--+-+--+-+-+---+ The statement I'm using is the following: $sql_statement = INSERT INTO rxPkt VALUES(\'$nodeId\', \'$rxNetTime\', \'$rxLat\', \'$rxLon\', \'$rxHeading\', \'$antIndex\', \'$rxPower\', \'$bin_msg\'); And I get the following error: - prepare for DBD::mysql::db (DBI::db=HASH(0x210496c)~0x2104924 'INSERT INT rxPkt VALUES('1', '1', '1.1104488373', '3.3301544189', '5.54866790 . ó?QRLt?.8?@UUT@??... .. !#$%'()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\] _`abc')') etting mysql_use_result to 0 - prepare= DBI::st=HASH(0x1a7f118) at unpack_v6.pl line 522. - DESTROY for DBD::mysql::st (DBI::st=HASH(0x1d158a8)~INNER) - DESTROY= undef at unpack_v6.pl line 523. - execute for DBD::mysql::st (DBI::st=HASH(0x1a7f118)~0x2103d64) - dbd_st_execute for 02103d58 ou have an error in your SQL syntax near '()*+,-./0123456789:;=?@ABCDEFGHIJKL NOPQRSTUVWXYZ[\]^_`abc')' at line 1 error 1064 recorded: You have an error in y ur SQL syntax near '()*+,-./0123456789:;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab ')' at line 1 - dbd_st_execute -2 rows !! ERROR: 1064 'You have an error in your SQL syntax near '()*+,-./012345678 :;=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abc')' at line 1' I'm a little confused because this same call is currently working for nearly the same table (same contents, different table name). The last field in the record is a binary file, ~150 bytes long. Not quite what the syntax error is that it is complaining about. Any suggestions? Thanks, Mark
RE: MySQL DBI Error
Hi, The statement I'm using is the following: $sql_statement = INSERT INTO rxPkt VALUES(\'$nodeId\', \'$rxNetTime\', \'$rxLat\', \'$rxLon\', \'$rxHeading\', \'$antIndex\', \'$rxPower\', \'$bin_msg\'); The best way to do this is use placeholders. In your example above, if any of the variables contains double quotes perl may interpret that as end of the string (and thus you'll have incorrect SQL statement). If variable contains single quote, MySQL will interpret that incorrectly. Please try the following: $dbh-do(q{ INSERT INTO rxPkt VALUES (?, ?, ?, ?, ?, ?, ?, ?) }, undef, $nodeId, $rxNetTime, $rxLat, $rxLon, $rxHeading, $antIndex, $rxPower, $bin_msg ); This is equivalent to: $sth = $dbh-prepare(q{ INSERT INTO rxPkt VALUES (?, ?, ?, ?, ?, ?, ?, ?) }); $sth-execute($nodeId, $rxNetTime, $rxLat, $rxLon, $rxHeading, $antIndex, $rxPower, $bin_msg); Using placeholders is a common practice. It makes code more readable and helps you avoid errors. For more information on using placeholders, read perldoc DBI. Regards, Alex.
Re: DBI error 127 no cc? HELP PLEASE
Michael, You need to compile DBI with the same compiler that compiled your version of Perl. In your case - Sun's cc. Alternatively you could install the package of Perl 5.6 from www.sunfreeware.com (compiled using gcc) and then compile DBI using gcc. (AFAIKR Solaris 8 perl is in /usr/bin, sunfreeware's in /usr/local/bin so they don't clash. Solaris 8 needs /usr/bin/perl for it's own use so don't remove it :-) ) HTH -- MarkT -Michael Novak- wrote: Howdy All. And Thanx for read'en this.. And A real Big thank you in advance for any on that can throw a little bit of help my way! I am having trouble installing the DBI mod on a SunOS 5.8 with perl version 5.005_03 During My Make Cmd I get the following error make: cc: Command not found make: *** [Perl.o] Error 127 My path is $PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin I tried to make a soft link form /usr/loval/bin/gcc to /usr/local/bin/cc for grins and giggles and no such luck Any Ideas?? Thanks Again! -Michael Novak- [EMAIL PROTECTED] Script started on Thu Jan 03 12:53:59 2002 sh-2.04$ sudo perl Makefile.PL *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer modules, then you'll need to install the RPC::PlServer, RPC::PlClient, Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you. You can install them any time after installing the DBI. You do *not* need these modules for typical DBI usage. Optional modules are available from any CPAN mirror, in particular http://www.perl.com/CPAN/modules/by-module http://www.perl.org/CPAN/modules/by-module ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module Checking if your kit is complete... Looks good Writing Makefile for DBI Remember to actually *read* the README file! Use 'make' to build the software (dmake or nmake on Windows). Then 'make test' to execute self tests. Then 'make install' to install the DBI and then delete this working directory before unpacking and building any DBD::* drivers. sh-2.04$ sudo make mkdir blib mkdir blib/lib mkdir blib/arch mkdir blib/arch/auto mkdir blib/arch/auto/DBI mkdir blib/lib/auto mkdir blib/lib/auto/DBI mkdir blib/man1 mkdir blib/man3 cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm cp DBIXS.h blib/arch/auto/DBI/DBIXS.h cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm cp lib/DBI/Format.pm blib/lib/DBI/Format.pm cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm cp Driver.xst blib/arch/auto/DBI/Driver.xst cp dbipport.h blib/arch/auto/DBI/dbipport.h cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm cp DBI.pm blib/lib/DBI.pm /bin/perl -p -e s/~DRIVER~/Perl/g blib/arch/auto/DBI/Driver.xst Perl.xsi /bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 /usr/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/perl5/5.00503/ExtUtils/typemap Perl.xs xstmp.c mv xstmp.c Perl.c cc -c -xO3 -xdepend-DVERSION=\1.20\ -DXS_VERSION=\1.20\ -KPIC -I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO_THREADS Perl.c make: cc: Command not found make: *** [Perl.o] Error 127 sh-2.04$ perl -V Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos localhost 5.8 sun4u sparc sunw,ultra-1 ' hint=previous, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-xO3 -xdepend', gccversion= cppflags='' ccflags ='' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.00503/sun4-solaris/CORE' cccdlflags='-KPIC', lddlflags='-G' Characteristics of this binary (from libperl): Built under solaris Compiled at Dec 22 1999 00:00:57 @INC: /usr/perl5/5.00503/sun4-solaris
DBI error 127 no cc? HELP PLEASE
Howdy All. And Thanx for read'en this.. And A real Big thank you in advance for any on that can throw a little bit of help my way! I am having trouble installing the DBI mod on a SunOS 5.8 with perl version 5.005_03 During My Make Cmd I get the following error make: cc: Command not found make: *** [Perl.o] Error 127 My path is $PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin I tried to make a soft link form /usr/loval/bin/gcc to /usr/local/bin/cc for grins and giggles and no such luck Any Ideas?? Thanks Again! -Michael Novak- [EMAIL PROTECTED] Script started on Thu Jan 03 12:53:59 2002 sh-2.04$ sudo perl Makefile.PL *** Note: The optional PlRPC-modules (RPC::PlServer etc) are not installed. If you want to use the DBD::Proxy driver and DBI::ProxyServer modules, then you'll need to install the RPC::PlServer, RPC::PlClient, Storable and Net::Daemon modules. The CPAN Bundle::DBI may help you. You can install them any time after installing the DBI. You do *not* need these modules for typical DBI usage. Optional modules are available from any CPAN mirror, in particular http://www.perl.com/CPAN/modules/by-module http://www.perl.org/CPAN/modules/by-module ftp://ftp.funet.fi/pub/languages/perl/CPAN/modules/by-module Checking if your kit is complete... Looks good Writing Makefile for DBI Remember to actually *read* the README file! Use 'make' to build the software (dmake or nmake on Windows). Then 'make test' to execute self tests. Then 'make install' to install the DBI and then delete this working directory before unpacking and building any DBD::* drivers. sh-2.04$ sudo make mkdir blib mkdir blib/lib mkdir blib/arch mkdir blib/arch/auto mkdir blib/arch/auto/DBI mkdir blib/lib/auto mkdir blib/lib/auto/DBI mkdir blib/man1 mkdir blib/man3 cp lib/DBI/W32ODBC.pm blib/lib/DBI/W32ODBC.pm cp lib/DBD/ExampleP.pm blib/lib/DBD/ExampleP.pm cp lib/DBI/FAQ.pm blib/lib/DBI/FAQ.pm cp lib/DBI/Shell.pm blib/lib/DBI/Shell.pm cp lib/DBI/ProxyServer.pm blib/lib/DBI/ProxyServer.pm cp lib/Bundle/DBI.pm blib/lib/Bundle/DBI.pm cp lib/DBD/Proxy.pm blib/lib/DBD/Proxy.pm cp DBIXS.h blib/arch/auto/DBI/DBIXS.h cp dbd_xsh.h blib/arch/auto/DBI/dbd_xsh.h cp dbi_sql.h blib/arch/auto/DBI/dbi_sql.h cp lib/DBD/NullP.pm blib/lib/DBD/NullP.pm cp lib/DBD/Sponge.pm blib/lib/DBD/Sponge.pm cp lib/DBI/Format.pm blib/lib/DBI/Format.pm cp lib/DBI/DBD.pm blib/lib/DBI/DBD.pm cp Driver.xst blib/arch/auto/DBI/Driver.xst cp dbipport.h blib/arch/auto/DBI/dbipport.h cp lib/Win32/DBIODBC.pm blib/lib/Win32/DBIODBC.pm cp DBI.pm blib/lib/DBI.pm /bin/perl -p -e s/~DRIVER~/Perl/g blib/arch/auto/DBI/Driver.xst Perl.xsi /bin/perl -I/usr/perl5/5.00503/sun4-solaris -I/usr/perl5/5.00503 /usr/perl5/5.00503/ExtUtils/xsubpp -typemap /usr/perl5/5.00503/ExtUtils/typemap Perl.xs xstmp.c mv xstmp.c Perl.c cc -c -xO3 -xdepend-DVERSION=\1.20\ -DXS_VERSION=\1.20\ -KPIC -I/usr/perl5/5.00503/sun4-solaris/CORE -DDBI_NO_THREADS Perl.c make: cc: Command not found make: *** [Perl.o] Error 127 sh-2.04$ perl -V Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos localhost 5.8 sun4u sparc sunw,ultra-1 ' hint=previous, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-xO3 -xdepend', gccversion= cppflags='' ccflags ='' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 alignbytes=8, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldl -lm -lc -lcrypt libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.00503/sun4-solaris/CORE' cccdlflags='-KPIC', lddlflags='-G' Characteristics of this binary (from libperl): Built under solaris Compiled at Dec 22 1999 00:00:57 @INC: /usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503 /usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 . sh-2.04$ unma ame -a SunOS zardoz 5.8 Generic_108528-06 sun4u sparc SUNW,UltraAX-MP script done on Thu Jan 03 12:54:42 2002
Re: DBI error 127 no cc? HELP PLEASE
On Thu, 3 Jan 2002, -Michael Novak- wrote: Howdy All. And Thanx for read'en this.. And A real Big thank you in advance for any on that can throw a little bit of help my way! I am having trouble installing the DBI mod on a SunOS 5.8 with perl version 5.005_03 During My Make Cmd I get the following error make: cc: Command not found make: *** [Perl.o] Error 127 My path is $PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin I tried to make a soft link form /usr/loval/bin/gcc to /usr/local/bin/cc for grins and giggles and no such luck If you have Sun Workshop, make sure that /opt/SUNWspro/bin is in your path and you can use Sun's CC. Also make sure that your PATH is exported, and double-check your symlink to make sure it's pointed correctly if you are using GCC. - D [EMAIL PROTECTED]
RE: DBI error 127 no cc? HELP PLEASE
First, you need to build your own perl... (using the version delivered with the OS almost never works, unless of have exactly the same cc that the OS vender used). You need to have either, some flavor of (ansi) cc or gcc to do it. I am about to do this on Sun0S 5.8 in the next few days... using gcc from the sun freeware cd. (and perl 5.6.1). If you can wait I'll let you know what the recipe is... toward the end of next week. Lincoln -Original Message- From: -Michael Novak- [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 03, 2002 4:07 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: DBI error 127 no cc? HELP PLEASE Howdy All. And Thanx for read'en this.. And A real Big thank you in advance for any on that can throw a little bit of help my way! I am having trouble installing the DBI mod on a SunOS 5.8 with perl version 5.005_03 During My Make Cmd I get the following error make: cc: Command not found make: *** [Perl.o] Error 127 My path is $PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/X11R6/bin I tried to make a soft link form /usr/loval/bin/gcc to /usr/local/bin/cc for grins and giggles and no such luck Any Ideas?? Thanks Again! -Michael Novak- [EMAIL PROTECTED]
Re: dbi error
Godoli Davide wrote: Ok, now I've already installed DBI-1_20 on my system, and when try to install DBD::ODBC I get: Did you really install DBI as well as DBD::ODBC? Try this: D:\perl -MDBI -e print $DBI::VERSION; 1.20 If you get: Can't locate DBI.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/5.6.1/lib/MSW in32-x86-multi-thread C:/Perl/site/5.6.1/lib C:/Perl/site/lib .). BEGIN failed--compilation aborted. Then there's something wrong with your DBI installtion. If I was you: ppm remove DBI DBD::ODBC ppm install DBI DBD::ODBC -- Simon Oliver
dbi error
Ok, now I've already installed DBI-1_20 on my system, and when try to install DBD::ODBC I get: -Version 0.28 of 'DBD::ODBC' is already installed -Remove it or use 'Verify --upgrade DBD::ODBC'. Then I try to lounch the demo: #!C:\Programmi\ActivePerl\bin\perl.exe use DBI; use CGI_Lite; $|=1; # ora dobbiamo cambiare il meccanismo # per leggere l'input dell'utente # l'input viene passato dal server http $cgi=new CGI::Lite; %form=$cgi-parse_form_data; $id=$form{id}; $dbh = DBI-connect ('dbi:ODBC:pubblicazioni'); $sql = SELECT * FROM Articoli WHERE ( Articoli.ArtID = $id ); $sth=$dbh-prepare($sql); $sth-execute; # e dobbiamo anche cambiare la fase di output # perche' ora il programma deve generare # un valido documento HTML print Content-type: text/html\n\n; print Il record numero $id contiene i seguenti dati:BR\n; foreach $field ( $sth-fetchrow() ) { print $fieldBR\n; } and I get: Can't locate loadable object for module DBI in @INC @INC contains: C:/Perl/lib. at C:/Perl/lib/DBI.pm line 190 BEGIN failed--compilation aborted at C:/Perl/lib/DBI.pm line 190. BEGIN failed in require at demo.cgi line 3. BEGIN failed--compilation aborted at demo.cgi line 3. Ok, now I attach to this E-mail the source code of my 'DBI.pm'. That's all. I hope you have an answer for me. Thanks. Dego.
Strange DBI Error.. Please help
Howdy, I installed DBI, DBD, MySQL modules on a sun4u sparc without error. MySQL client works fine. (from command line) But Perl says this: my $dbh = DBI-connect(DBI:mysql:user=root;database=NETWORK, {'RaiseError' = 1}); -- error message -- ld.so.1: /usr/local/bin/perl: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBD/mysql/mysql.so: symbol mysql_init: referenced symbol not found Killed Does anyone have any idea what I can do to fix? Checked numerous mailing list archives addressing this issue, though I did not see any conclusive suggestions... Thanks in advance.. Brad
RE: Strange DBI Error.. Please help
May be this link can help you: http:[EMAIL PROTECTED]/msg00636.html --Raju -Original Message- From: Brad [mailto:[EMAIL PROTECTED]] Sent: Friday, October 19, 2001 10:22 AM To: DBI-Users Subject: Strange DBI Error.. Please help Howdy, I installed DBI, DBD, MySQL modules on a sun4u sparc without error. MySQL client works fine. (from command line) But Perl says this: my $dbh = DBI-connect(DBI:mysql:user=root;database=NETWORK, {'RaiseError' = 1}); -- error message -- ld.so.1: /usr/local/bin/perl: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBD/mysql/mysql.so: symbol mysql_init: referenced symbol not found Killed Does anyone have any idea what I can do to fix? Checked numerous mailing list archives addressing this issue, though I did not see any conclusive suggestions... Thanks in advance.. Brad
DBI error expected but didn't get any
Hi, I'm using DBI 1.16 with DBD:Oracle 1.06 , the following line does NOT give me an error, while the same code DOES give an error (as it should) when run through sqlplus: update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', MESSAGE='Reset from GUI by user: user',TIMESTAMP=991379859000 where SYSTEM_NAME='hdxh20' and MODULE='KPN_Log' and INSTANCE='-tmp-logfile1_txt' and (PARAMETER = 'Msg' or PARAMETER = 'OldMsg'); The point is that the value for SEVERITY is too large for the column, which oracle sqlplus reports as: update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', * ERROR at line 1: ORA-01401: inserted value too large for column My question is: why does the $dbh-do() I issue the same command with using DBI/DBD not return an error?? (RaiseError = 1, PrintError = 1) Oracle version is 8.1.7. OS = HPUX 11.00 ** Trace with level 7 and perl -V output appended: DBI 1.16-nothread dispatch trace level set to 7 Note: perl is running without the recommended perl -w option - do in DBD::_::db for DBD::Oracle::db (DBI::db=HASH(0x402406c0)~0x4023a7ec 'update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', MESSAGE='Reset from GUI by user: patrolAgent',TIMESTAMP=99138546 where SYSTEM_NAME='hdxh20' and MODULE='KPN_Log' and INSTANCE='KPN_Log' and (PARAMETER = 'Msg' or PARAMETER = 'OldMsg')') 2 - prepare for DBD::Oracle::db (DBI::db=HASH(0x4023a7ec)~INNER 'update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', MESSAGE='Reset from GUI by user: patrolAgent',TIMESTAMP=99138546 where SYSTEM_NAME='hdxh20' and MODULE='KPN_Log' and INSTANCE='KPN_Log' and (PARAMETER = 'Msg' or PARAMETER = 'OldMsg')' undef) New DBI::st (for DBD::Oracle::st, parent=DBI::db=HASH(0x4023a7ec), id=) dbih_setup_handle(DBI::st=HASH(0x4024072c)=DBI::st=HASH(0x401f791c), DBD::Oracle::st, 40240774, Null!) dbih_make_com(DBI::db=HASH(0x4023a7ec), DBD::Oracle::st, 204) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Err, DBI::db=HASH(0x4023a7ec)) SCALAR(0x40242da0) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), State, DBI::db=HASH(0x4023a7ec)) SCALAR(0x4018def0) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Errstr, DBI::db=HASH(0x4023a7ec)) SCALAR(0x40242dc4) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Handlers, DBI::db=HASH(0x4023a7ec)) ARRAY(0x4026e2fc) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Debug, DBI::db=HASH(0x4023a7ec)) 0 (already defined) OCIHandleAlloc(4002d6b8,40227084,4,0,)=SUCCESS OCIStmtPrepare(4028d920,4003eb30,'update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', MESSAGE='Reset from GUI by user: patrolAgent',TIMESTAMP=99138546 where SYSTEM_NAME='hdxh20' and MODULE='KPN_Log' and INSTANCE='KPN_Log' and (PARAMETER = 'Msg' or PARAMETER = 'OldMsg')',286,1,0)=SUCCESS OCIAttrGet(4028d920,4,40227088,,24,4003eb30)=SUCCESS dbd_st_prepare'd sql UPDATE dbd_describe skipped for UPDATE 2 - prepare= DBI::st=HASH(0x4024072c) at /var/tools/lib/perl5/PA-RISC1.1/DBI.pm line 930. - execute for DBD::Oracle::st (DBI::st=HASH(0x4024072c)~0x401f791c) dbd_st_execute UPDATE (out0, lob0)... OCIStmtExecute(4003e900,4028d920,4003eb30,1,0,,,0)=SUCCESS OCIAttrGet(4028d920,4,7f7e2430,,9,4003eb30)=SUCCESS OCIAttrGet(4028d920,4,7f7e2454,,10,4003eb30)=SUCCESS dbd_st_execute UPDATE returned (SUCCESS, rpc0, fn5, out0) - execute= '0E0' at /var/tools/lib/perl5/PA-RISC1.1/DBI.pm line 931. - rows for DBD::Oracle::st (DBI::st=HASH(0x4024072c)~0x401f791c) OCIAttrGet(4028d920,4,7f7e23b8,,9,4003eb30)=SUCCESS - rows= 0 at /var/tools/lib/perl5/PA-RISC1.1/DBI.pm line 932. - do= '0E0' at ./set_status line 31. DESTROY ignored for outer handle DBI::st=HASH(0x4024072c) (inner DBI::st=HASH(0x401f791c)) - DESTROY for DBD::Oracle::st (DBI::st=HASH(0x401f791c)~INNER) OCIHandleFree(4028d920,4)=SUCCESS - DESTROY= undef at ./set_status line 39. dbih_clearcom (h 0x4024072c, com 0x40227008): FLAGS 0x191: COMSET Warn RaiseError PrintError TYPE 3 PARENT DBI::db=HASH(0x4023a7ec) KIDS 0 (0 active) IMP_DATA undef in 'DBD::Oracle::st' NUM_OF_FIELDS 0 NUM_OF_PARAMS 0 dbih_clearcom 0x4024072c (com 0x40227008, type 3) done. - commit for DBD::Oracle::db (DBI::db=HASH(0x402406c0)~0x4023a7ec) OCITransCommit(4003e900,4003eb30,0)=SUCCESS - commit= 1 at ./set_status line 39. - disconnect for DBD::Oracle::db (DBI::db=HASH(0x402406c0)~0x4023a7ec) OCISessionEnd(4003e900,4003eb30,4028e480,0)=SUCCESS
RE: DBI error expected but didn't get any
): FLAGS 0x191: COMSET Warn RaiseError PrintError TYPE 2 PARENT DBI::dr=HASH(0x40035d1c) KIDS 0 (0 active) IMP_DATA undef in 'DBD::Oracle::db' dbih_clearcom 0x40248170 (com 0x40036c08, type 2) done. - DBI::END disconnect_all DISPATCH (DBI::dr=HASH(0x40175714) rc1/3 @1 g0 a401b2fe8) at /var/tools/lib/perl5/PA-RISC1.1/DBI.pm line 424. - disconnect_all for DBD::Oracle::dr (DBI::dr=HASH(0x40175714)~0x40035d1c) - disconnect_all= '' at /var/tools/lib/perl5/PA-RISC1.1/DBI.pm line 424. - DBI::END complete DESTROY DISPATCH (DBI::dr=HASH(0x40035d1c) rc1/1 @1 g0 a0) during global destruction. - DESTROY in DBD::_::common for DBD::Oracle::dr (DBI::dr=HASH(0x40035d1c)~INNER) - DESTROY= undef during global destruction. dbih_clearcom (h 0x40175714, com 0x4003c088): FLAGS 0x215: COMSET Active Warn AutoCommit TYPE 1 PARENT undef KIDS 0 (0 active) IMP_DATA undef in 'DBD::Oracle::dr' dbih_clearcom 0x40175714 (com 0x4003c088, type 1) done. DESTROY DISPATCH (DBI::dr=HASH(0x40175714) rc1/1 @1 g0 a0) during global destruction. DESTROY for DBI::dr=HASH(0x40175714) ignored (inner handle gone) --- Frans Postma, (050-58) 81 852 KPN Datacenter, SDU Unix Support -Oorspronkelijk bericht- Van: Tim Bunce [mailto:[EMAIL PROTECTED]] Verzonden: vrijdag 1 juni 2001 11:24 Aan: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Onderwerp: Re: DBI error expected but didn't get any First try rebuilding DBD::Oracle if it wasn't built for the version of Oracle you're talking to. If that doesn't help then talk to Oracle about it. Don't mention the DBI, just talk about your 'Oracle OCI application' :) On the upside, it seems that it does say 0 rows updated :) Tim. On Fri, Jun 01, 2001 at 10:52:59AM +0200, [EMAIL PROTECTED] wrote: Hi, I'm using DBI 1.16 with DBD:Oracle 1.06 , the following line does NOT give me an error, while the same code DOES give an error (as it should) when run through sqlplus: update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', MESSAGE='Reset from GUI by user: user',TIMESTAMP=991379859000 where SYSTEM_NAME='hdxh20' and MODULE='KPN_Log' and INSTANCE='-tmp-logfile1_txt' and (PARAMETER = 'Msg' or PARAMETER = 'OldMsg'); The point is that the value for SEVERITY is too large for the column, which oracle sqlplus reports as: update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', * ERROR at line 1: ORA-01401: inserted value too large for column My question is: why does the $dbh-do() I issue the same command with using DBI/DBD not return an error?? (RaiseError = 1, PrintError = 1) Oracle version is 8.1.7. OS = HPUX 11.00 ** Trace with level 7 and perl -V output appended: DBI 1.16-nothread dispatch trace level set to 7 Note: perl is running without the recommended perl -w option - do in DBD::_::db for DBD::Oracle::db (DBI::db=HASH(0x402406c0)~0x4023a7ec 'update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', MESSAGE='Reset from GUI by user: patrolAgent',TIMESTAMP=99138546 where SYSTEM_NAME='hdxh20' and MODULE='KPN_Log' and INSTANCE='KPN_Log' and (PARAMETER = 'Msg' or PARAMETER = 'OldMsg')') 2 - prepare for DBD::Oracle::db (DBI::db=HASH(0x4023a7ec)~INNER 'update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate,escalation_id='*NONE*', MESSAGE='Reset from GUI by user: patrolAgent',TIMESTAMP=99138546 where SYSTEM_NAME='hdxh20' and MODULE='KPN_Log' and INSTANCE='KPN_Log' and (PARAMETER = 'Msg' or PARAMETER = 'OldMsg')' undef) New DBI::st (for DBD::Oracle::st, parent=DBI::db=HASH(0x4023a7ec), id=) dbih_setup_handle(DBI::st=HASH(0x4024072c)=DBI::st=HASH(0x401f791c), DBD::Oracle::st, 40240774, Null!) dbih_make_com(DBI::db=HASH(0x4023a7ec), DBD::Oracle::st, 204) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Err, DBI::db=HASH(0x4023a7ec)) SCALAR(0x40242da0) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), State, DBI::db=HASH(0x4023a7ec)) SCALAR(0x4018def0) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Errstr, DBI::db=HASH(0x4023a7ec)) SCALAR(0x40242dc4) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Handlers, DBI::db=HASH(0x4023a7ec)) ARRAY(0x4026e2fc) (already defined) dbih_setup_attrib(DBI::st=HASH(0x401f791c), Debug, DBI::db=HASH(0x4023a7ec)) 0 (already defined) OCIHandleAlloc(4002d6b8,40227084,4,0,)=SUCCESS OCIStmtPrepare(4028d920,4003eb30,'update DC_PATROL_STATUS_TABLE set SEVERITY='OK',date_inserted=sysdate
Re: DBI error expected but didn't get any
On Fri, Jun 01, 2001 at 12:18:55PM +0200, [EMAIL PROTECTED] wrote: Tim, Is my assumption correct that either: OCIStmtPrepare or OCIStmtExecute should return an error of some sort ?? I'd expect OCIStmtExecute to return OCI_ERROR or OCI_SUCCESS_WITH_INFO. But since the update says it updated 0 rows perhaps the problem lies there. I.e., the where clause didn't match (for whatever obscure reason, maybe charset issues) so Oracle never got to the point of discovering it would need to truncate the field. I did rebuild DBD on the same machine against Oracle 8.1.7. yesterday. We have pretty much all versions of Oracle over here, so I tried it on Oracle 7.3.4. (hpux10.20, same perl).. got the same result. Would that mean that there's a never-found bug in OCI ?? (kinda hard to believe it has persisted for so long) Indeed. Output is below, note that that server is a production/HA-server so I can't install DBI 1.16 without testing it extensivly. That's would be relevant. Tim.
FW: DBI error math.h
-Original Message- From: NEWMAN, SCOTT (SBIS) Sent: Tuesday, March 13, 2001 2:00 PM To: '[EMAIL PROTECTED]' Subject: DBI error math.h I'm running Solaris 2.6 / Perl 5.005 / GCC 2.8.1 /DBI 1.14 I'm recieving the error below-- Any Suggestions??? # make gcc -c -I/usr/local/include -O -DVERSION=\"1.14\" -DXS_VERSION=\"1.14\" -fPIC -I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE -Wall -Wno-comment -DDBI_NO_THREADS Perl.c In file included from /usr/local/lib/perl5/5.00503/sun4-solaris/CORE/perl.h:1531, from DBIXS.h:19, from Perl.xs:1: /opt/GCC281/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/include/math.h:5: math.h: No such file or directory *** Error code 1 make: Fatal error: Command failed for target `Perl.o' Thanks, S C O T T N E W M A N SR. SYSTEM APPLICATION / DEVELOPER SBC INTERNET SERVICES 1701 ALMA DRIVE, 1S-141 PLANO, TEXAS 75075-6917 214.495.2521PHONE 214.495.2253FAX 888.270.59512-WAY PAGER 214.803.2504 MOBILE ...
Re: FW: DBI error math.h
"NEWMAN, SCOTT (SBIS)" wrote: I'm running Solaris 2.6 / Perl 5.005 / GCC 2.8.1 /DBI 1.14 I'm recieving the error below-- Any Suggestions??? # make gcc -c -I/usr/local/include -O -DVERSION=\"1.14\" -DXS_VERSION=\"1.14\" -fPIC -I/usr/local/lib/perl5/5.00503/sun4-solaris/CORE -Wall -Wno-comment -DDBI_NO_THREADS Perl.c In file included from /usr/local/lib/perl5/5.00503/sun4-solaris/CORE/perl.h:1531, from DBIXS.h:19, from Perl.xs:1: /opt/GCC281/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/include/math.h:5: math.h: No such file or directory *** Error code 1 make: Fatal error: Command failed for target `Perl.o' Your installation of GCC is broken. Upgrade to 2.95.2 and/or reinstall. Failing that, you might try copying /usr/include/math.h to /opt/GCC281/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/include/math.h, but this cannot be recommended since the GCC private version was created because GCC regards the system version as defective in some manner. OTOH, the error message seems to be about a math.h included at line 5 of the file I suggested you overwrite; maybe the problem is the /usr/include is broken (in which case, you need to revisit how to install the /usr/include directory on your Solaris machine -- maybe by copying pertinent files from another Solaris machine running the same version of the o/s. -- Jonathan Leffler ([EMAIL PROTECTED], [EMAIL PROTECTED]) Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/ #include disclaimer.h
DBI error between 12:24am and 12:59am
- Original Message - From: "Jean-Francois Larente" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, February 16, 2001 12:19 PM Subject: DBI error between 12:24am and 12:59am Hello all, I have joined the list today and I hope I will be able to share some experience with everyone. We have a problem here we can't seem to put our finger on: We are accessing a 1 #!/usr/bin/perl -w 2 3 package SURVEY; 4 5 use DBI; 6 use CONSTANTS; 7 use strict; 8 9 my $surveydb = CONSTANTS-Surveys; 10 11 sub getsurvey 12 { 13 my $count = 0; 14 my $survey_table = ""; 15 16 The variable $rightnow holds the current time instance 17 of the cgi's execution in MySQL format 18 19 my $rightnow = sprintf("%.0d-%.0d-%.0d %.0d:%.0d:%.0d", 20 (localtime)[5]+1900,(localtime)[4]+1,(localtime)[3], 21 (localtime)[2],(localtime)[1],(localtime)[0]); 22 23 my $dbh = DBI-connect($surveydb, 'Joe', 'password') or denial($DBI::errstr); 24 25 do 26 { 27 my $randnum = 0; 28 my $id = 0; 29 my $sumfound = 0; 30 my $tempid = 0; 31 my $sumpick = 0; 32 my $priority = 0; 33 my @tempid = (); 34 $count++; 35 36 pick a random number and set the priority level 37 of the survey to be displayed 38 39 $randnum = int(rand 16); 40 41 if($randnum 1) 42 { 43 if($randnum 3) 44 { 45 if($randnum 10) 46 { 47 if($randnum 12) 48 { 49 $priority = 3; 50 } 51 else 52 { 53 $priority = 4; 54 } 55 } 56 else 57 { 58 $priority = 5; 59 } 60 } 61 else 62 { 63 $priority = 2; 64 } 65 } 66 else 67 { 68 $priority = 1; 69 } 70 71 my $datainput = $dbh-prepare("SELECT SURVEY_ID FROM QUESTION WHERE PRIORITY_TYPE='$ priority'") 72 or return error($dbh-errstr); 73 if($datainput-execute()) 74 { . Line 73... DBD::mysql::st execute failed: Can't find file: './SURVEYS/QUESTION.frm' (errno: 13) at /usr/lib/perl5/site_perl/5.005/i386-linux/SURVEY.pm line 73. This problem is occuring on 3 different machines that are not really similar in hardware but quite similar in software. Mysql 3.22 perl 5.00503 We use mysql manually and have no problems. We use it through a different module with no problems. It only happens for about 1/2 hour between midnight and 1am... (12:24 to 12:29) The great thing is that we can reproduce the problem anytime we want. Hopefully this is a known issue. Thanks, J.F. Larente DBA Moshpit Entertainment
DBI error between 12:24am and 12:59am
Hello all, I have joined the list today and I hope I will be able to share some experience with everyone. We have a problem here we can't seem to put our finger on: We are accessing a 1 #!/usr/bin/perl -w 2 3 package SURVEY; 4 5 use DBI; 6 use CONSTANTS; 7 use strict; 8 9 my $surveydb = CONSTANTS-Surveys; 10 11 sub getsurvey 12 { 13 my $count = 0; 14 my $survey_table = ""; 15 16 The variable $rightnow holds the current time instance 17 of the cgi's execution in MySQL format 18 19 my $rightnow = sprintf("%.0d-%.0d-%.0d %.0d:%.0d:%.0d", 20 (localtime)[5]+1900,(localtime)[4]+1,(localtime)[3], 21 (localtime)[2],(localtime)[1],(localtime)[0]); 22 23 my $dbh = DBI-connect($surveydb, 'Joe', 'password') or denial($DBI::errstr); 24 25 do 26 { 27 my $randnum = 0; 28 my $id = 0; 29 my $sumfound = 0; 30 my $tempid = 0; 31 my $sumpick = 0; 32 my $priority = 0; 33 my @tempid = (); 34 $count++; 35 36 pick a random number and set the priority level 37 of the survey to be displayed 38 39 $randnum = int(rand 16); 40 41 if($randnum 1) 42 { 43 if($randnum 3) 44 { 45 if($randnum 10) 46 { 47 if($randnum 12) 48 { 49 $priority = 3; 50 } 51 else 52 { 53 $priority = 4; 54 } 55 } 56 else 57 { 58 $priority = 5; 59 } 60 } 61 else 62 { 63 $priority = 2; 64 } 65 } 66 else 67 { 68 $priority = 1; 69 } 70 71 my $datainput = $dbh-prepare("SELECT SURVEY_ID FROM QUESTION WHERE PRIORITY_TYPE='$ priority'") 72 or return error($dbh-errstr); 73 if($datainput-execute()) 74 { . Line 73... DBD::mysql::st execute failed: Can't find file: './SURVEYS/QUESTION.frm' (errno: 13) at /usr/lib/perl5/site_perl/5.005/i386-linux/SURVEY.pm line 73. This problem is occuring on 3 different machines that are not really similar in hardware but quite similar in software. Mysql 3.22 perl 5.00503 We use mysql manually and have no problems. We use it through a different module with no problems. It only happens for about 1/2 hour between midnight and 1am... (12:24 to 12:29) The great thing is that we can reproduce the problem anytime we want. Hopefully this is a known issue. Thanks, J.F. Larente DBA Moshpit Entertainment