Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in connecting to oracle using perl on windows

Status
Not open for further replies.

naru21

Technical User
May 24, 2002
13
US
Hello all,
I used DBI module to connect to oracle in Perl.But yet I'm getting the following error. I am able to use PL/SQL and connect to the sales database without any error.
==========================================================
DBI connect('sales','scott',...) failed: ORA-12705: invalid or unknown NLS parameter value specified (DBD ERROR: OCISessionBegin) at C:\Perl\Examples\select.pl
line 5
===========================================================
#!C:\perl\bin
use strict;
use DBI;

my $dbh= DBI ->connect ('DBI:Oracle:sales','scott','tiger',
{
RaiseError => 1,
AutoCommit => 0
})
|| die ("\nCann't connect to oracle $DBI::errstr"); #Connect to oracle


#create table
my $sql = qq{select EID,ENAME from emp1};
print "SQL is : $sql \n";
my $sth = $dbh->prepare( $sql );
$sth->execute();

my( $eid, $ename );
$sth->bind_columns( undef, \$eid, \$ename);

while( $sth->fetch() ) {
print "$eid ,$ename\n";
}


$sth->finish();
$dbh->disconnect();

Thanks in advance.

 
This might help

HTH
--Paul

Paul
------------------------------------
Spend an hour a week on CPAN, helps cure all known programming ailments ;-)
 
That looks very like a version mismatch between the Oracle installations on the client and the server. Are you using instant client or the 4 hour download version on the perl host?

Yours,

fish

["]As soon as we started programming, we found to our surprise that it wasn't as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.["]
--Maur
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top