1

I installed DBD::Oracle from CPAN and tried to use the code below to connect to Oracle DB:

use DBI;
use DBD::Oracle;

BEGIN {
    $ENV{ORACLE_HOME} ='C:\instantclient_11_2';   
    $ENV{'NLS_LANG'}='WE8ISO8859P15';
}


my $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid;port=$port", "$user/$pass", '');

But I get the following error message:

DBI connect('host=host;sid=mysid;port=1521','user/pass',...) failed: ERROR OCIEnvNlsCreate.
Check ORACLE_HOME (Linux) env var  or PATH (Windows) and or NLS settings, permissions, etc. at test.pl line 21

Could someone help me to solve this problem?

Worth to mention that I added C:\instantclient_11_2 to the path environment variable + I created an environment variable ORACLE_HOME and set it to c:\instantclient_11_2.

Snorri
  • 446
  • 2
  • 10
smith
  • 3,232
  • 26
  • 55
  • 1
    Look at http://stackoverflow.com/questions/1848808/how-to-install-dbdoracle-in-strawberry-perl – mpapec May 12 '13 at 07:11

0 Answers0