BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
scorbett
Calcite | Level 5

ERROR: Unable to load oracle client (oci.dll)
ERROR: Error in the LIBNAME statement.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

View solution in original post

7 REPLIES 7
ChrisHemedinger
Community Manager

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.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
SASKiwi
PROC Star

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?

scorbett
Calcite | Level 5

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.

 

ChrisHemedinger
Community Manager

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.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
scorbett
Calcite | Level 5

It appears I have Oracle - OraClient12Home1 and Oracle - OraClient12Home1_32bit.  But I need to have _64bit?

 

ChrisHemedinger
Community Manager

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;
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 2042 views
  • 2 likes
  • 4 in conversation