Oracle: ORA-24327 need explicit attach before authenticating a user in perl script

[email protected] (suuuper)
Newsgroups perl.dbi.users
Organization http://groups.google.com
Message-ID <ac3ab90c-35dd-4e9c-a4fd-3b942a6bd1d9@v20g2000yqb.googlegroups.com>
Hi,

i write the sequent script:

#######################################################################
use DBI;

my $orachehost = "*********";
my $oracleuser = "**********";
my $orachepasswd = "******";
my $oraclesid = "*****";
my $oracle_home = "/usr/lib/oracle/11.2/client";

$ENV{ORACLE_HOME}=$oracle_home;
$ENV{ORACLE_SID}=$oraclesid;
$ENV{PATH}="$oracle_home/bin";

my $dbh = DBI->connect( "dbi:Oracle:host=$orachehost:sid=$oraclesid",
$oracleuser, $orachepasswd, { AutoCommit =>
1,RaiseError=>1,PrintError=>1 }  ) ||   die("Errore nella connessione
al db: $DBI::errstr");

$dbh->disconnect;

exit 0;

#######################################################################

When i run the script, it doesn't work and write:

DBI connect('host=**********:sid=*******','********',...) failed:
ORA-24327: need explicit attach before authenticating a user (DBD
ERROR: OCISessionBegin) at /usr/local/sbin/myscript.pl

Any ideas?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.