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

Hello Everyone

 

Could you please advise what steps are required to setup sas oracle configration on Linux. We alredy installed oracle client 11.2 version on sas9.4.

 

Oracle installed : /usr/lib/oracle/11.2./client64

TNS File Path : /etc/opt/oracle

 

I am getting below error from SAS EG: -

 

ERROR: Unable to connect to Oracle-Oracle environment is either not set or set incorrectly!
ERROR: Error in the LIBNAME statement.

1 ACCEPTED SOLUTION

Accepted Solutions
Timmy2383
Lapis Lazuli | Level 10

See if you can use my setup as a template for your own. Here's what the entry for Oracle client in my env_local file looks like:

 

#ORACLE

export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/client
export ORACLE_VERSION=11.2.0
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

View solution in original post

14 REPLIES 14
japsas100
Pyrite | Level 9

done...Again I am getting the same error: 

ERROR: Unable to connect to Oracle-Oracle environment is either not set or set incorrectly!
ERROR: Error in the LIBNAME statement.

Timmy2383
Lapis Lazuli | Level 10
Probably works the same way as what Kurt suggested, but mine is set in the env_local file under !SASROOT/SASFoundation/9.4/bin/

You need to set the LD_LIBRARY_PATH environment variable in this file. See page 59 in this doc:

http://support.sas.com/documentation/installcenter/en/ikfdtnunxcg/66380/PDF/default/config.pdf
japsas100
Pyrite | Level 9

I have added these variable in both these files but still getting the same error.

 

I noticed when i execuate below prog its showing Oracle_Home not exit during signon?

 

data _null_;
if sysexist('$ORACLE_HOME') then do;
put "Exists";
Oracle_Home = sysget('$ORACLE_HOME');
put Oracle_Home = ;
end;
else put "Not exists";
run;

 

japsas100
Pyrite | Level 9

We are not using sas connect. I am getting the error agin .

 

28 data _null_;
29 if sysexist('LD_LIBRARY_PATH') then do;
30 put "Exists";
31 LD_LIBRARY_PATH = sysget('LD_LIBRARY_PATH');
32 put LD_LIBRARY_PATH = ;
33 end;
34 else put "Not exists";
35 run;

Exists
LD_LIBRARY_PATH=/opt/sas/sashome/Secure/sasexe:/opt/sas/sashome/SASODBCDriversfortheWebInfrastructurePlatformDataServer/9.4/Driver:/
opt/sas/sashome/SASPrivateJavaRuntimeEnvironment/9.4/jre/lib/amd64/server:/opt/sas/s
NOTE: DATA statement used (Total process time):

 

Is this env resolved coreclty?

 

oracle error: 

ERROR: Could not load /opt/sas/sashome/SASFoundation/9.4/sasexe/sasora (105 images loaded)
ERROR: libclntsh.so.11.1: cannot open shared object file: No such file or directory
24
25 LIBNAME abc ORACLE PATH=prod USER=sas_r PASSWORD=XXXXXXXXXXX;
ERROR: The SAS/ACCESS Interface to ORACLE cannot be loaded. ERROR: Image SASORA found but not loadable..
Please make sure Oracle environment is set correctly.
Look in the install/Config doc for additional info for your platform.
Other possible reasons - incomplete Oracle client install, 32/64-bit mismatch between Oracle client & SAS, incorrect Oracle client
version(Oracle client must match the version picked during post-install process), incompatible sasora for your OS or its
attribs don't permit SAS to load it.
ERROR: Error in the LIBNAME statement.

Timmy2383
Lapis Lazuli | Level 10

Where is your Oracle client installed and do you have SAS/Access to Oracle licensed/installed?

japsas100
Pyrite | Level 9

yes we have licened for oracle client. but know know how we can whether it is installed or not?

 

oracle client version 11.2 installed on Linux env. on below path : 

/usr/lib/oracle/11.2./client64

 

Oracle database version : Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit

 

Timmy2383
Lapis Lazuli | Level 10

See if you can use my setup as a template for your own. Here's what the entry for Oracle client in my env_local file looks like:

 

#ORACLE

export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=/u02/app/oracle/product/11.2.0/client
export ORACLE_VERSION=11.2.0
export PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

japsas100
Pyrite | Level 9

Thanks for reply. 

 

Still getting the same error.

Timmy2383
Lapis Lazuli | Level 10
1. Can you show what your env_local file looks like?2. Are you starting new SAS sessions for testing after each change?
japsas100
Pyrite | Level 9

Thanks Timmy2383

Issued has been fixed. Acutually use not have the appropriate access right thats why its throwing error.

 

When I assigned all the required access through smc then I am able to connect with oracle without any error.

 

Thanks You soo much for your help.

 

 

 

 

Timmy2383
Lapis Lazuli | Level 10
Glad you got it resolved!

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 14 replies
  • 8454 views
  • 0 likes
  • 3 in conversation