Hi SAS Frens,
When I submit the code below it works fine (SAS 9.4 Grid on Windows environment) but when I schedule the job to run (SAS Scheduling Server) it fails with the below error. My guess is that the Server does not have the SAS/ACCESS interface. Would Explicit SQL Pass through be any help?
libname oraRXI oracle user=XXXXX pw="XXXXX"
schema=RXI path="(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP)(HOST=XXX.com)(PORT=XXXX)) (CONNECT_DATA=(SERVICE_NAME=XXXX.com)))";
proc sql;
create table want as select * from have;
quit;
ERROR: The SAS/ACCESS Interface to ORACLE cannot be loaded.
ERROR: Image SASORA found but not loadable..
ERROR: in the LIBNAME statement
ERROR: Libref ORARXI is not assigned.
I'd check the license/install in your batch job by including proc product_status; run; and reviewing that log.
If SAS/ACCESS to Oracle is not available, then explicit passthrough will not work either. If it is licensed/installed, then your SAS environment still needs to know where your Oracle client is, the TNSNAMES.ora file, etc. These are usually controlled by environment variables and an Oracle or SAS admin can advise.
Just went through this myself and added these variables to my shell script:
export ORACLE_HOME=[path]/oracle/12.2.0.1 export LD_LIBRARY_PATH=[path]/oracle/12.2.0.1/lib export TNS_ADMIN=[path]/admin
I'd check the license/install in your batch job by including proc product_status; run; and reviewing that log.
If SAS/ACCESS to Oracle is not available, then explicit passthrough will not work either. If it is licensed/installed, then your SAS environment still needs to know where your Oracle client is, the TNSNAMES.ora file, etc. These are usually controlled by environment variables and an Oracle or SAS admin can advise.
Just went through this myself and added these variables to my shell script:
export ORACLE_HOME=[path]/oracle/12.2.0.1 export LD_LIBRARY_PATH=[path]/oracle/12.2.0.1/lib export TNS_ADMIN=[path]/admin
In your SAS programs you can check the current values of these environment variables to report them in the SAS log:
%put %sysget(ORACLE_HOME); %put %sysget(TNS_ADMIN); %put %sysget(LD_LIBRARY_PATH);
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.