ERROR: Unable to load oracle client (oci.dll)
ERROR: Error in the LIBNAME statement.
Likely causes:
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.
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.
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?
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.
So the obvious question first: did you have the Oracle client installed and set up on this new computer?
Likely causes:
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.
It appears I have Oracle - OraClient12Home1 and Oracle - OraClient12Home1_32bit. But I need to have _64bit?
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.