RE: Error always returned from system() after connecting to Oracl e10 .2 on Solaris 64 bit
am 09.11.2007 12:55:59 von peter.sands------_=_NextPart_001_01C822C6.DFDF8752
Content-Type: text/plain
Thanks - that is the answer.
Peter Sands
-----Original Message-----
From: Aaron Saarela [mailto:aaron_saarela@symantec.com]
Sent: 08 November 2007 19:34
To: Sands Peter; dbi-users@perl.org
Subject: RE: Error always returned from system() after connecting to Oracle
10 .2 on Solaris 64 bit
Hi Peter,
Oracle (either DBD or the driver itself) is changing the default signal
handler. This results in the system call always return -1 (in reality it's
the 'wait' call that's returning this value).
Once you establish a connection, try resetting the default signal handler.
E.g.:
My $dbh = DBI->connect( ...
$SIG{ CHLD } = 'DEFAULT';
Regards,
-Aaron
-----Original Message-----
From: Sands Peter [mailto:peter.sands@british-energy.com]
Sent: Wednesday, November 07, 2007 8:32 AM
To: 'dbi-users@perl.org'
Subject: Error always returned from system() after connecting to Oracle 10
..2 on Solaris 64 bit
Running perl5.8.3 compiled 32 bit with the Perl libraries, DBD 1.15, DBI
1.41 distributed with Oracle 10.2, I find that, having connected to Oracle
within a perl script any subsequent system() calls return a -1 error status,
even simple commands like true. (First tried building and using
DBD-Oracle-1.19, DBI-1.40 with the same results).
>cat dbtest.pl
use strict;
use Getopt::Std;
use DBI;
# Connect to database
my $db = DBI -> connect("DBI:Oracle:","","",
{AutoCommit => 0,PrintError => 0,RaiseError => 1})
or die "Failed to connect: $DBI::errstr\n"; $db
-> disconnect();
system(true);
print "$?\n";
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 dbtest.pl
-1
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -v
This is perl, v5.8.3 built for sun4-solaris-thread-multi
Copyright 1987-2003, Larry Wall
Perl may be copied only under the terms of either the Artistic License or
the GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/
, the Perl Home Page.
>file /opt/app/oracle/product/10.2/perl/bin/perl5.8.3
/opt/app/oracle/product/10.2/perl/bin/perl5.8.3: ELF 32-bit MSB
executable SPARC Version 1, dynamically linked, not stripped
>echo $PERL5LIB
/opt/app/oracle/product/10.2/perl/lib/5.8.3:/opt/app/oracle/ product/10.2
/per
l/lib/site_perl/5.8.3/
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBD::Oracle;
>print
$DBD::Oracle::VERSION,"\n";'
1.15
>/opt/app/oracle/product/10.2/perl/bin/perl5.8.3 -e 'use DBI; print
$DBI::VERSION,"\n";'
1.41
Peter Sands
Application Technical Architect
Telephone 01452-652642 (Internal 777-2642)
Personal e-mail peter.sands@british-energy.com
DSSS Production Support Team e-mail: Barnwood IM Trading Apps Support
Information Management
British Energy, Barnett Way, Barnwood, Gloucester, GL4 3RS
|* This e-mail, and any attachments, is confidential and for the use of
the addressee only.
|* If you are not the intended recipient, please telephone +44 (0) 1506
|408700
|* We do not accept legal responsibility for this e-mail or any viruses.
|* All e-mails sent and received by us are monitored.
|* Contracts cannot be concluded with us by e-mail.
|* This message has been sent from a member of the British Energy Group
(the "Group").
|* The parent company of the Group is British Energy Group plc, a
|company registered in Scotland, registered number 270184, and having
|its registered office at
|* Systems House, Alba Campus, Livingston EH54 7EG
------_=_NextPart_001_01C822C6.DFDF8752--