
FishMonger
Veteran
/ Moderator
Dec 30, 2008, 6:05 AM
Post #2 of 2
(6426 views)
|
Re: [pra_ml] DBD::ORACLE connectivity problem
[In reply to]
|
Can't Post
|
|
You need to install the Oracle database driver module DBD::Oracle. http://search.cpan.org/~pythian/DBD-Oracle-1.22/Oracle.pm Your method of assigning the ENV var is wrong. It's better style and a "Best Practice" to put your use statements, which are loaded at compile time, before any other code. And, every Perl script you write should include the warnings and strict pragmas.
#!/usr/local/bin/perl use warnings; use strict; use DBI; $ENV{"ORACLE_HOME"} = "/x/home/oracle/product/8.1.7"; my $dbh = DBI->connect('DBI:Oracle:abcde', 'uname', 'passwd');
(This post was edited by FishMonger on Dec 30, 2008, 6:06 AM)
|