DBI/DBD Oracle Connections
am 26.08.2005 16:58:22 von richard.fordWe 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.
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=-1.
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.sh tml
============================================================ ==================