Hi Sal,
> The error I am getting is while trying to connect to oracle is
> DBI connect() failed :DBD (login failed,check your
> config,e.g.ORACLE_HOME/bin on your PATH etc) at orac_dba.pl line 304
> Any advise ?
It sounds like ORACLE_HOME is not set in your Win32 environment. However I
need more information, to help any more. The first thing to do, is make sure
ORACLE_HOME is set in your environment. Having done this, make sure a simple
Perl DBI script can connect to your Oracle database, and print out some kind of
result. (Any kind of "Hello World" script will do, as long as it successfully
connects to Oracle.)
For example, adapt the script below, and then make sure it works:
#!perl -w
use strict;
use DBI;
# Connect to Oracle database.
my $dbh = DBI->connect( 'dbi:Oracle:ORCL.WORLD', 'scott', 'tiger',
{ RaiseError => 1,
AutoCommit => 0 } );
# Create the SQL.
my $sql = qq{ SELECT SYSDATE||' Hello World :-)!' message FROM DUAL };
# Prepare the SQL and execute.
my $sth = $dbh->prepare( $sql );
$sth->execute();
# Fetch output row into array.
while ( my($message) = $sth->fetchrow_array) {
# Print out the Hello World message.
print $message, "\n";
}
$dbh->disconnect();
Having established our small DBI script works, then try Orac again. If it
fails once more, could you supply us with:
*. The version of Orac.
*. The version of DBI
*. The version of DBD::Oracle
*. How you've compiled/created everything
Make sure before you post again, you do re-read all the DBI and DBD::Oracle
README files, because the answer's probably in there, deep down, awaiting your
imminent discovery! :-)
You may also want to read:
=> http://dbi.perl.org/doc/faq.html
=> http://dbi.perl.org/cgi/moduledump?module=DBD::Oracle
HTH a bit! Good luck! 8-)
Rgds,
AndyD
=====
Make Someone Happy. Buy a Copy of:
=> http://www.oreilly.com/catalog/oracleopen/
-----BEGIN GEEK CODE BLOCK-----
GO/SS/TW d- s+:+ a C++$ U++$ P++++$ L++$ !E W+ N+ K- W O-
M+ V-- PS+ PE++ Y+ PGP t+@ 5 X- R* tv- b+++ DI++ D G e++
h---- r+++ y++++
------END GEEK CODE BLOCK------
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/