After installing the Oracle DBD for DBI, on a client Solaris 8 (Intel) server I ran
the following script and received this error:
#!/usr/bin/perl -w
use DBI;
my ($sth, $dbh, @row);
unlink 'dbitrace.log' if -e 'dbitrace.log';
DBI->trace(5, 'dbitrace.log');
$dbh = DBI->connect("dbi:Oracle:ORACLE","scott", "tiger", {
PrintError => 0,
RaiseError => 1
} );
$sth = $dbh->prepare("select author.author_number, author_last,
author_first, book_code, sequence_number
from author, wrote
where author.author_number = wrote.author_number");
$sth->execute();
while (@row = $sth->fetchrow_array()){
print "@row\n";
}
$dbh->disconnect();
exit;
DBI->connect(ORACLE) failed: ORA-01017: invalid username/password; logon denied (DBD
ERROR: OCISessionBegin) at ./dbfetchrow_array.pl line 11
Segmentation Fault
The database is not on the local server, it is on another server located on the same
segment. On the client server I have installed the Oracle client software and Pro*C.
I think the problem is with tnsnames.ora on the client server. Does anyone have any
suggestions on resolving this problem.
I'm able to authenticate using scott/tiger, if I use the scott account from the client
server using sqlplus.
Thanks,
Roger Patrick.