Reputation: 966
I'm trying to connect to a remote oracle database in my perl app. When running the app, the following error appears:
"Connection Error: ERROR OCINlsEnvironmentVariableGet(OCI_NLS_CHARSET_ID)"
I got Oracle Instant Client and placed it locally then set the Oracle Home env to it, as I don't have Oracle client installed there. My code is below:
BEGIN {
$ENV{NLS_LANG} = "AMERICAN_AMERICA.UTF8";
$ENV{OCI_NLS_CHARSET_ID} = "AMERICAN_AMERICA.UTF8";
$ENV{ORACLE_HOME} = #The path to the instant Oracle client";
}
#Connect to database
my $DBHandle = DBI->connect(
"dbi:Oraclehost=$host;sid=$sid;port=$port",
$userName,
$passWord
) or die "Connection Error: $DBI::errstr\n";
I'm using ActiveStat perl on Windows Server 2008, ORACLE 10g
Upvotes: 0
Views: 758
Reputation: 966
I could find the root cause. I used Oracle Instant Client lite (instantclient-basiclite-win64-10.2.0.5) which contains only binaries. Then I tried Oracle Instant Client - SDK, which contains only lib.
I found that I need to merge both to get my code working, I used the SDK as main client, created a bin directory into it then placed the lite client into it...it works !
Upvotes: 1