- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
ERROR: Unable to load oracle client (oci.dll)
ERROR: Error in the LIBNAME statement.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Likely causes:
- You don't have the Oracle client installed on this machine
- or, you have an Oracle client installed but it's maybe the 32-bit version and you're running 64-bit SAS, so you need the 64-bit Oracle client
- or, you have the client(s) but the environment PATH variable doesn't have the Oracle paths included so the SAS process cannot find it.
- or, a variation on the above, you do have it in the PATH variable but the wrong version (32-bit) is ahead of the one you need (64-bit).
Check your PATH variable here (on Windows):
Go to Start button > Search > Enter Environment > Select Edit the System Environment variables > Click Environment Variables button-> In System variables, find PATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You haven't shared much detail here. It's possible that your PATH or other environment variables aren't set to find the Oracle client libraries. Usually that's an administrator / config task to set up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Please post the LIBNAME statement you are using. Despite rumours to the contrary we aren't good at guessing what is in statements based on the errors produced....
Is this a first time error or has it just started happening?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Has worked before but this is the first time running it on a new computer.
1 libname PHI_RES oracle user=scorbett
2 password=XXXXXXXXXXXXXXXX
3 path=KSPHI
4 schema=PHI_RESEARCH
5 oracle_73_or_above=YES
6 preserve_col_names=YES
7 preserve_tab_names=YES
8 dbindex=NO;
ERROR: Unable to load oracle client (oci.dll)
ERROR: Error in the LIBNAME statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
So the obvious question first: did you have the Oracle client installed and set up on this new computer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Likely causes:
- You don't have the Oracle client installed on this machine
- or, you have an Oracle client installed but it's maybe the 32-bit version and you're running 64-bit SAS, so you need the 64-bit Oracle client
- or, you have the client(s) but the environment PATH variable doesn't have the Oracle paths included so the SAS process cannot find it.
- or, a variation on the above, you do have it in the PATH variable but the wrong version (32-bit) is ahead of the one you need (64-bit).
Check your PATH variable here (on Windows):
Go to Start button > Search > Enter Environment > Select Edit the System Environment variables > Click Environment Variables button-> In System variables, find PATH.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It appears I have Oracle - OraClient12Home1 and Oracle - OraClient12Home1_32bit. But I need to have _64bit?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I'm guessing your SAS is 64-bit version. Your Oracle client that SAS loads, which it will find in your PATH, must also be 64-bit.
SAS Tech Support can help. This diagnostic program (run and save the log) can provide a lot of good information to solve it quickly. I'm assuming you're running this with SAS for Windows.
%put Site: &syssite Release: &sysvlong System: &sysscp &sysscpl; %put &sysuserid;
%let SASROOT=%SYSGET(SASROOT);
%put %quote(&SASROOT);
%macro doit(command);
filename p pipe &command lrecl=32767;
data _null_;
infile p;
input;
put _infile_;
run;
%mend;
option LS=256;
%doit("set");
* windows only;
%doit("dir ""&SASROOT\access\sasexe\sasio*""");
%doit("reg query ""HKLM\Software\Oracle"" /s");
%doit("reg query ""HKLM\Software\Wow6432Node\Oracle"" /s");
%put %quote(%sysget(PATH));
libname oralib oracle user=orauser password=orapass path=orapath;