On 10/21/2010 1:11 PM, suuuper wrote:
Funny that should work.
What version of DBD Oracle are you using??

Can you connect using sqlplus??

If no it means there is some sort of TNSNAMES.ORA or other problems on the oracel network side of things


I would try using an oracle easy connect string like this

DBI->connect( "dbi:Oracle","testuser", "passw...@someoracle.sid")'

hope this helps
cheers
John Scoles
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?


Reply via email to