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

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

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
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

View solution in original post

3 REPLIES 3
ChrisHemedinger
Community Manager

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
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
SAShole
Pyrite | Level 9
I confirmed that SAS/ACCESS Interface is available and have reached out to the SAS Admins about pointing SAS to the Oracle DB. Thank you for the info about TNSNAMES.ora it was helpful.
ChrisHemedinger
Community Manager

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);
Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 3 replies
  • 929 views
  • 4 likes
  • 2 in conversation