On Fri, Aug 26, 2005 at 10:58:22AM -0400, Ford, Richard wrote: > We are encountering a problem when we connect to an Oracle database and do not > provide the database name in the connect string. > > The ORACLE_HOME that the DBD was compiled against is > /app/oracle/client > > The Oracle ENV variables defined outside of perl are: > ORACLE_HOME=/app/oracle/DEV > ORACLE_SID=DEV > PATH=$ORACLE_HOME/bin:usr/sbin:/usr/bin > > my $dbh_sysdba = DBI->connect("DBI:Oracle:", "scott", "tiger") or die "Can't > connect to DEV\n"; > > This connection succeeds: > print "dbh=$dbh_sysdb\n"; > dbh=DBI::db=HASH(0x12d2e4) > > however, all subsequent OS calls from perl return failure, even though > these OS calls are successfull.
[from memory] The Oracle 'Bequeath' kind of db connection forks a child process and Oracle sets up a SIGCHLD handler to catch the death of the child process. That signal handler, instead of perls own, gets called when the system() child exits. That's what causes the problem. The archives should produce previous discussions. Tim. > Now if we connect to an Oracle database and provide the database name. > For example: > my $dbh_sysdba = DBI->connect("DBI:Oracle:DEV", "scott", "tiger") or die > "Can't connect to DEV\n" > > This connectcion succeeds and all OS calls from perl return success. > For example: > system ("ls -lrt /app/home/oracle"); > total 10 > -rwxrwxrwx 1 oracle oracle 1507 Jul 25 17:08 rgw.ksh > drwxr-xr-x 2 oracle oracle 96 Jul 28 04:58 rparker > drwxr-xr-x 7 oracle oracle 1024 Jul 28 18:24 RGW > drwxr-xr-x 3 oracle oracle 96 Jul 29 16:18 backup > drwxr-xr-x 4 oracle oracle 96 Aug 18 09:59 bberg10_bkp > drwxr-xr-x 23 oracle oracle 1024 Aug 22 17:19 rda > drwxr-xr-x 4 oracle oracle 1024 Aug 25 15:09 scripts > print "status=$?\n"; > status=0. > > We are running Perl 5.6 (32bit), Perl DBI 1.43, and DBD 1.5 on Solaris 5.8. > > The DBD has been compiled against an Oracle 10.1.0.4 64 Bit database. > > ============================================================================== > Please access the attached hyperlink for an important electronic > communications disclaimer: > > http://www.csfb.com/legal_terms/disclaimer_external_email.shtml > > ============================================================================== >