system() return code always '-1' after DBI/DBD local connection



Dear all,

I am attempting to package a common Perl v5.8.6 + DBI
v1.48 + DBD::Oracle v1.16 on Solaris 8+ for use at my
site. The DBD::Oracle module has been compiled against
Oracle 10g client and appears to be able to connect OK
to Oracle 8i, 9i & 10g databases. However, one of my
beta-tester developers has raised the following
concern with regards to return codes from the 'system'
command following a [successful] local database
connection. After making a connection with DBI, it
appears that all future 'system' commands return exit
code '-1', example:

$rc = system("echo 'hello world'); # return code
"0", as expected.
$conn_str = "dbi:Oracle:";
$username = "/";
$passwd = "";
if( !($APP_Handle =
DBI->connect($conn_str, $username, $passwd)))
{
$internal_error =
$internal_error."Could not connect to
$ENV{ORACLE_SID}: ".$DBI::errstr.".";
return;
}
$rc = system("echo 'hello world'); # return code
"-1" received, not expected.
$rc = system("echo 'this will not work either'); #
return code "-1" received, not expected.

The key points are:

i. The database name is omitted after the dbi:Oracle:.
This forces a local connection (ie. Not via SQL*Net)
using the $ORACLE_SID environment variable.
ii. The username is set to "/" and the password is
blank. This forces an externally defined connection
using the UNIX user for authentication.

Due to in-house security policies, our developers must
connect to their Oracle databases using the above
method.

- Has anyone else experienced this issue/potential bug
previosuly?
- Can anyone else verify that they get this unexpected
behaviour also? What Perl/DBI/DBD/Oracle client
versions do you use?

Thanks a lot for any help you can offer,


David Bartlett.






___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online? http://uk.messenger.yahoo.com
.



Relevant Pages

  • Re: Oracle 8i installation on RedHat Linux 7.3
    ... >I can connect from client to my server at linux system now. ... >different name and check your connection again. ... Copyright 1997 Oracle Corporation. ...
    (RedHat)
  • RE: Oracle Client, stored procedures and Cursor release.
    ... I think there is no many things we can do in the client. ... Usually we can save the resource by closing the connection, ... Or if oracle has provided some system call just ...
    (microsoft.public.dotnet.languages.vb)
  • Re: possible bug in DBI with DBD::Oracle
    ... what was the ORacle version working with 1.16? ... connection method. ... to a DB using DBI once I successfully connected then failed (with ... But on one computer I get "OK NOK NOK NOK", ...
    (perl.dbi.users)
  • Re: HELP
    ... Not familiar with specs for Oracle Client, ... ODBC driver). ... >> Connection and Recordset Objects) in order to use ODBC ...
    (microsoft.public.excel.programming)
  • RE: ORACLE DRIVER
    ... [trap is a table in my oracle database & ORACLE is the dsn name] ... use DBI; ... But I don't know how to make a connection using DBD ... So is there any free Oracle ODBC driver for Linux? ...
    (perl.dbi.users)