#!/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", $dbus +er, $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$logfil +e 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 >/p>
Any idea??? What am I doing wrong? Of course I have googled it and found alot of info about local vars that need to be configured, but nothing was helpful.
Thanks!!In reply to Getting error while using dbi:oracle by tprizler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |