Folks,
I'm receiving the following error after running a perl script on a client Solaris 8 Intel server:
unix:/# dbfetchrow_array.pl
DBI->connect(ORACLE) failed: ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin) at ./dbfetchrow_array.pl line 11
Segmentation Fault
The script is trying to connect to a Oracle 8.1.7 Database running on a Solaris 8 Sparc server. I can connect to the database from the Intel box using sqlplus /nolog connect scott/tiger@Oracle (So I think tnsnames.ora is configured properly on client)
Here is the script:
#!/usr/bin/perl -w
use DBI;
my ($sth, $dbh, @row);
unlink 'dbitrace.log' if -e 'dbitrace.log';
DBI->trace(2, 'dbitrace.log');
#perform the database connection
$dbh = DBI->connect("dbi:Oracle:ORACLE","scott", "tiger", {
PrintError => 0,
RaiseError => 1
} );
#prepare a sql statement for execution
$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"
#execute the statement in the oracle database
$sth->execute();
#retreive the returned rows of data from the array
while (@row = $sth->fetchrow_array()){
print "@row\n";
}
#disconnect from the database
$dbh->disconnect();
Any help would be appreciated.
StickyBit.
I'm receiving the following error after running a perl script on a client Solaris 8 Intel server:
unix:/# dbfetchrow_array.pl
DBI->connect(ORACLE) failed: ORA-01017: invalid username/password; logon denied (DBD ERROR: OCISessionBegin) at ./dbfetchrow_array.pl line 11
Segmentation Fault
The script is trying to connect to a Oracle 8.1.7 Database running on a Solaris 8 Sparc server. I can connect to the database from the Intel box using sqlplus /nolog connect scott/tiger@Oracle (So I think tnsnames.ora is configured properly on client)
Here is the script:
#!/usr/bin/perl -w
use DBI;
my ($sth, $dbh, @row);
unlink 'dbitrace.log' if -e 'dbitrace.log';
DBI->trace(2, 'dbitrace.log');
#perform the database connection
$dbh = DBI->connect("dbi:Oracle:ORACLE","scott", "tiger", {
PrintError => 0,
RaiseError => 1
} );
#prepare a sql statement for execution
$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"
#execute the statement in the oracle database
$sth->execute();
#retreive the returned rows of data from the array
while (@row = $sth->fetchrow_array()){
print "@row\n";
}
#disconnect from the database
$dbh->disconnect();
Any help would be appreciated.
StickyBit.