OS: Solaris 8.5
DBMS: Oracle 8.1.5.0.0
Perl: 5.005_03
Perl Module: DBD-Oracle-1.06
Segmentation Fault(coredump) when trying to connect to Oracle
=============================================================
The following is the command in Perl that causes the error:
$dbh = DBI->connect('DBI:Oracle:ORCL', 'scott', 'tiger') or die "Can't
connect to database.";
If I comment out the above line the code works fine (it does not do
anything, but it gives no compilation errors or segfaults.
I can connect to this database via sqlplus from the OS command line.
I have tried several variants of the above line, but get the same segfault
everytime. I have also tried explicitly specifying the host and sid as
follows:
$dbh = DBI->connect('DBI:Oracle:host=hostname;sid=ORCL', 'scott', 'tiger')
or die "Can't connect to database.";
Also tried including my in front of the above line as shown in some
examples:
my $dbh = DBI->connect('DBI:Oracle:ORCL', 'scott', 'tiger') or die "Can't
connect to database.";
I have even tried including both the name and password in the second
argument to connect():
$dbh = DBI->connect('DBI:Oracle:ORCL', 'scott/tiger', '') or die "Can't
connect to database.";
I have tried all the combinations of the above variants.
Anyone know why I might be having this problem?
The complete code follows:
#!/usr/bin/perl -w
use lib "/usr/local/lib/perl5/site_perl/5.6.0";
use DBI;
$dbh = DBI->connect('DBI:Oracle:ORCL', 'scott', 'tiger') or die "Can't
connect to database.";