CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Trying to use dbi:Oracle and getting error message!



Mar 28, 2010, 8:05 AM

Post #1 of 2 (732 views)
Trying to use dbi:Oracle and getting error message! Can't Post

Hi All,

I am trying to use the DBI module.
I am trying to connect to a remote oracle server.

This is my script:

#!/usr/bin/env perl 

use warnings;
use strict;
use DBI;

my $dbuser = 'bla';
my $pass = 'bla';
my $table = 'v$log,v$logfile';
my $columns = 'v$logfile.member';
my $statment="SELECT v\$logfile.member FROM v\$log, v\$logfile WHERE v\$ = v\$;";

# connect to the database
my $dbh = DBI->connect("dbi:Oracle:host=some_hostname;sid=MCDB", $dbuser, $pass) or die "Cant connect to : $DBI::errstr\n";

# select entries in the database
my $sth = $dbh->prepare('SELECT v$logfile.member FROM v\$log, v$logfile WHERE v$ = v$;');

# execute the select statement

my @data = $sth->fetchrow_array();
foreach my $x (@data)
print "$x \n";

# end the reading of results
# disconnect from the database

When running the script I get the following error:

user@hostname [/export/home]% ./
install_driver(Oracle) failed: Can't load '/export/home/user/local/lib/perl/gen/auto/DBD/Oracle/' for module DBD::Oracle: perl-static: fatal: open failed: No such file or directory at /export/home/user/perl/lib/5.8.6/sun4-solaris-thread-multi/ line 230.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected
at ./ line 14

Any idea???


Apr 1, 2010, 2:39 AM

Post #2 of 2 (717 views)
Re: [tprizler] Trying to use dbi:Oracle and getting error message! [In reply to] Can't Post

Not really a perl question, but a similar problem was discussed in


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives