freelanceprogrammers.org Forum Index » Perl
OCIEnvNlsCreate() issue.
Joined: 24 Dec 2005
Posts: 8
OCIEnvNlsCreate() issue.
hi,
iam working on windowsXP and and i want to connect the oracle for
that i install DBI and DBD::Oracle module sucessfully.
This is the code:
use DBI;
print "hai1";
$ENV{`PATH`} = `D:oracleora90BIN`;
$ENV{`ORACLE_HOME`} = `D:oracle`;
$ENV{`LD_LIBRARY_PATH`} = `D:oracleora90LIB`;
$ENV{`SQLPATH`} = `D:oracleora90BIN`;
$ENV{`TNS_ADMIN`} = `D:oracle`;
$ENV{`PERL5LIB`} = `F:Perlsitelib`;
#$ENV{`NLS_LANG`} = `AMERICAN_AMERICA.UTF8`;# ``,
#`WE8ISO8859P1`,`ENGLISH`,`AL32UTF8` also tried...;
#$dsn = q{dbi:Oracle:QQ3_VLAN} ;
#($dbuser,$dbpassword) = ("foo","foo");
#$ENV{`ORACLE_HOME`}="d:oracleora90";
$driver=DBI->install_driver(`Oracle`);
if(!$driver)
{print "driver is not installed";
}
else
{
$dbh = DBI->connect("SID", "scott", "tiger",
{ RaiseError => 1, AutoCommit => 0 });
}
but when i execute i am getting this error:
first it shows hai1 and it gives alert message like..
F:Perl>perl first.pl
hai1
The procedure entry point OCIEnvNlsCreate could not be located in
the dynamic link library OCI.dll.
after that when i click ok button then it gives like this message.
F:Perl>perl first.pl
hai1install_driver(Oracle) failed: Can`t
load `F:/Perl/site/lib/auto/DBD/Oracle/
Oracle.dll` for module DBD::Oracle: load_file:The specified
procedure could not
be found at F:/Perl/lib/DynaLoader.pm line 206.
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn`t installed where
expected
Please anyone can solve this issue..
Thaks
gopal.
Joined: 02 Aug 1999
Posts: 11
OCIEnvNlsCreate() issue.
--- In Perl_Official@yahoogroups.com, "kgopal_sh" <kgopal_sh@y...> wrote:
>
> hi,
> iam working on windowsXP and and i want to connect the oracle for
> that i install DBI and DBD::Oracle module sucessfully.
>
>
> This is the code:
> use DBI;
> print "hai1";
> $ENV{`PATH`} = `D:oracleora90BIN`;
> $ENV{`ORACLE_HOME`} = `D:oracle`;
> $ENV{`LD_LIBRARY_PATH`} = `D:oracleora90LIB`;
> $ENV{`SQLPATH`} = `D:oracleora90BIN`;
> $ENV{`TNS_ADMIN`} = `D:oracle`;
> $ENV{`PERL5LIB`} = `F:Perlsitelib`;
>
You are truncating some important environment variables. Namely
LD_LIBRARY_PATH and PATH. Use ".=" to avoid truncation.
> #$ENV{`NLS_LANG`} = `AMERICAN_AMERICA.UTF8`;# ``,
> #`WE8ISO8859P1`,`ENGLISH`,`AL32UTF8` also tried...;
>
> #$dsn = q{dbi:Oracle:QQ3_VLAN} ;
> #($dbuser,$dbpassword) = ("foo","foo");
>
> #$ENV{`ORACLE_HOME`}="d:oracleora90";
> $driver=DBI->install_driver(`Oracle`);
> if(!$driver)
> {print "driver is not installed";
> }
> else
> {
> $dbh = DBI->connect("SID", "scott", "tiger",
> { RaiseError => 1, AutoCommit => 0 });
> }
>
>
>
> but when i execute i am getting this error:
> first it shows hai1 and it gives alert message like..
> F:Perl>perl first.pl
> hai1
>
> The procedure entry point OCIEnvNlsCreate could not be located in
> the dynamic link library OCI.dll.
>
> after that when i click ok button then it gives like this message.
>
>
> F:Perl>perl first.pl
> hai1install_driver(Oracle) failed: Can`t
> load `F:/Perl/site/lib/auto/DBD/Oracle/
> Oracle.dll` for module DBD::Oracle: load_file:The specified
> procedure could not
> be found at F:/Perl/lib/DynaLoader.pm line 206.
> Compilation failed in require at (eval 1) line 3.
> Perhaps a required shared library or dll isn`t installed where
> expected
>
First place to look would be in F:/Perl/site/lib/auto/DBD/Oracle.
Make sure there is a file in there called "Oracle.dll". If it`s
there, I`d imagine your modifications to the environment above are
causing some problems.
>
> Please anyone can solve this issue..
>
> Thaks
> gopal.
>
Your data source string above looks incorrect but I don`t normally use
the DBI->install command. Try changing SID to "dbi:Oracle:SID". I am
assuming the name of your database is SID (although SID is a pretty
generic term when you`re talking about Oracle). If your database is
not named SID, use the actual name for your database (or ORACLE SID) is.
See also "perldoc DBD::Oracle" for documentation and examples
specifically using that module. "perldoc DBI" is also a good (but
long) read.
All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help
China Wholesale - Electronics Products
Character Studio - Tutorials and Help







