Perl Monk, Perl Meditation | |
PerlMonks |
Host command fails if there is a database connectionby astroboy (Chaplain) |
on Nov 20, 2009 at 03:45 UTC ( [id://808330]=perlquestion: print w/replies, xml ) | Need Help?? |
astroboy has asked for the wisdom of the Perl Monks concerning the following question:
Here's a real weird one. I can successfully invoke SQL*Plus (Oracle's SQL shell) from a Perl script. However, if I create a DBI connection first, it fails. The SQL script, test.sql:
and the perl script: which dies with:
However if I comment line 4, it works! Now it works for me on an older system. The differences are:
older system: Perl 5.10.0, DBI 1.609,DBD::Oracle.1.23, Centos 5.4, Oracle 11g release 1 new system: Perl 5.10.1, DBI 1.609, DBD::Oracle.1.23, Centos 5.4, Oracle 11g release 2 To try and eliminate Perl, I used the vendor version (5.8) on the new system. The only thing I can guess is that the version of Oracle makes a difference. But before I go to all of the trouble of reinstalling Oracle, I'm wondering if anyone can offer a reason for my problem, and a solution. Note: the actual code in my app uses IPC::Cmd to handle the external command call (and deal with stderr and stdout, etc). I simply use qx{} the test case above to illustrate the unerlying problem. In the real code, the SQL script runs without error, but the return status is always -1
Back to
Seekers of Perl Wisdom
|
|