Architecting, installing and maintaining your SAS environment

SAS Oracle Configration

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 126
Accepted Solution

SAS Oracle Configration

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.


Accepted Solutions
Solution
‎03-28-2017 08:00 AM
Regular Contributor
Posts: 170

Re: SAS Oracle Configration

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


All Replies
Super User
Posts: 6,971

Re: SAS Oracle Configration

You need to set the Oracle environment variables in ...../Lev1/level_env.sh

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 126

Re: SAS Oracle Configration

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.

Regular Contributor
Posts: 170

Re: SAS Oracle Configration

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
Frequent Contributor
Posts: 126

Re: SAS Oracle Configration

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;

 

Super User
Posts: 6,971

Re: SAS Oracle Configration

Do not use the dollar sign in a %sysget, sysget or sysexist, just use ORACLE_HOME.

 

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 6,971

Re: SAS Oracle Configration

And what do you mean by "during signon"? Is SAS/CONNECT involved in the situation in some way?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Frequent Contributor
Posts: 126

Re: SAS Oracle Configration

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.

Regular Contributor
Posts: 170

Re: SAS Oracle Configration

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

Frequent Contributor
Posts: 126

Re: SAS Oracle Configration

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

 

Solution
‎03-28-2017 08:00 AM
Regular Contributor
Posts: 170

Re: SAS Oracle Configration

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

Frequent Contributor
Posts: 126

Re: SAS Oracle Configration

Thanks for reply. 

 

Still getting the same error.

Regular Contributor
Posts: 170

Re: SAS Oracle Configration

1. Can you show what your env_local file looks like?2. Are you starting new SAS sessions for testing after each change?
Frequent Contributor
Posts: 126

Re: SAS Oracle Configration

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.

 

 

 

 

Regular Contributor
Posts: 170

Re: SAS Oracle Configration

Glad you got it resolved!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

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