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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



tprizler
Novice

Mar 28, 2010, 8:05 AM

Post #1 of 2 (669 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:


Code
#!/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\$log.group# = v\$logfile.group#;";

# 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$log.group# = v$logfile.group#;');

# execute the select statement
$sth->execute;

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


# end the reading of results
#$sth->finish;
# disconnect from the database
$dbh->disconnect;



When running the script I get the following error:

user@hostname [/export/home]% ./getRawDevices.pl
install_driver(Oracle) failed: Can't load '/export/home/user/local/lib/perl/gen/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle: ld.so.1: perl-static: fatal: libclntsh.so.9.0: open failed: No such file or directory at /export/home/user/perl/lib/5.8.6/sun4-solaris-thread-multi/DynaLoader.pm 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 ./getRawDevices.pl line 14

Any idea???
Thanks!!


rovf
Veteran

Apr 1, 2010, 2:39 AM

Post #2 of 2 (654 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 http://www.orafaq.com/forum/t/68299/0.

 
 


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

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