Home » Open Source » Programming Interfaces » Unable to connect DB through Perl (Oracle 10g on Windows 64bit)
Unable to connect DB through Perl [message #414187] |
Mon, 20 July 2009 16:06  |
kishore_001
Messages: 2 Registered: July 2009
|
Junior Member |
|
|
I am trying to connect Oracle DB through Perl using below script. It is not connecting. I would appreciate if there is anything else I can check in the environment to make it work.
#!C:\perl\bin\perl.exe
#print "Enter Opera Database Server IP Address - 10.xxx.xxx.2\n";
#chop ($ipad = <>);
use DBI;
# define local variables
my($dbh, $db, $user, $passwd);
$db="host=localhost;SID=orcl;port=1521";
$user="scott";
$passwd="tiger";
print (" Connecting with out any parameters");
my $dbh1 = DBI->connect( "dbi:Oracle:orcl", "scott", "tiger" )
or die "Can't connect to 1st Oracle database: $DBI::errstr . \n";
|
|
|
|
|
|
Goto Forum:
Current Time: Sat May 03 22:16:34 CDT 2025
|