system() return code always '-1' after DBI/DBD local connection
- From: davidbartlett2003@xxxxxxxxxxx (David Bartlett)
- Date: Fri, 20 May 2005 15:17:09 +0100 (BST)
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
.
- Follow-Ups:
- Prev by Date: DBI->disconnect is not a DBI method. Read the DBI manual. at ff.pl line 224
- Next by Date: postgres SSL
- Previous by thread: DBI->disconnect is not a DBI method. Read the DBI manual. at ff.pl line 224
- Next by thread: Re: system() return code always '-1' after DBI/DBD local connection
- Index(es):
Relevant Pages
|