Problem with connecting to an Oracle database using Perl

charles_at_swifttel.net
Date: 01/18/05


Date: 18 Jan 2005 12:52:32 -0800

If this is a double post, please excuse me.

Gentlemen:

I have struggled with this problem for a while now with no success at
finding the answer, so I am asking for help from anyone who might know
the solution.

I am using Windows XP, ActiveState Perl 5.8.4, Oracle 9.2.0.1.0 client
and server, DBI (1.45) and DBD-Oracle (1.16) installed as ppm packages
from ftp.esoftmatic.com/outgoing/DBI/5.8.4/

I do not have a problem connecting to the remote database using the
Oracle Enterprise Manager program from my PC. However, I am getting
the following error when I try to connect to the database from perl:

DBI connect('host=10.1.10.61;sid=ssdb','system',...) failed: ERROR
OCIInitialize. Check ORACLE_HOME and NLS settings etc. at
D:\PerlScripts\ora1.pl line 17

Unable to connect to database: ERROR OCIInitialize. Check ORACLE_HOME
and NLS settings etc.

My perl script is:

#!/usr/bin/perl

use strict;
use DBI;
use DBD::Oracle qw(:ora_session_modes); # ORA_SYSDBA & ORA_SYSOPER
constants

my ($dsn,$usr,$pwd);
my ($dbh);

$ENV{NLS_LANG} = 'american';
$ENV{ORACLE_HOME} = 'D:\Oracle\ora92';

# connect to remote Oracle DB
$dsn='DBI:Oracle:host=10.1.10.61;sid=ssdb';
$usr='system';
$pwd='manager';
$dbh = DBI->connect($dsn,$usr,$pwd) || die "Unable to connect to
database: $DBI::errstr\n";

I have used NLS_LANG settings of 'american_america.we8iso8859p1'
and 'american_america.utf8' to no avail. I know the ORACLE_HOME to
be correct. I cannot figure out why I am getting the OCIInitialize
error. Any help will be greatly appreciated. Thanks in advance.
Charles Lawrence



Relevant Pages

  • RE: Perl-Oracle DBI module
    ... Subject: Re: Perl-Oracle DBI module ... Check with your Oracle DBA if you're ... I'm just guessing that maybe the error code from OCIInitialize is ... Check ORA CLE_HOME and NLS settings etc.) Tests ...
    (perl.dbi.users)
  • RE: Perl-Oracle DBI module
    ... Did you set your Oracle environment as specified in the README files? ... Subject: Perl-Oracle DBI module ... UNKNOWN OCI STATUS 24322) OCIInitialize. ... Check ORACLE_HOME and NLS settings etc. at t/general.t ...
    (perl.dbi.users)
  • Re: Perl-Oracle DBI module
    ... > Trying to install Oracle Driver for Perl I get the error message ... > UNKNOWN OCI STATUS 24322) OCIInitialize. ... > and NLS settings etc. at t/general.t line 21 ... > Unable to connect to Oracle OCIInitialize. ...
    (perl.dbi.users)
  • RE: Perl-Oracle DBI module
    ... Oracle has some environment variables that are critical, ... UNKNOWN OCI STATUS 24322) OCIInitialize. ... Check ORA CLE_HOME and NLS settings etc.) Tests ... Thomas Cook - The ultimate expert in leisure travel, ...
    (perl.dbi.users)
  • Problem with connecting to an Oracle database using Perl
    ... I do not have a problem connecting to the remote database using the ... Oracle Enterprise Manager program from my PC. ... Check ORACLE_HOME and NLS settings etc. at ... ERROR OCIInitialize. ...
    (perl.dbi.users)