Architecting, installing and maintaining your SAS environment

Unable to access Oracle DB from PC-SAS using SAS/CONNECT to Liinux

Reply
Occasional Contributor
Posts: 5

Unable to access Oracle DB from PC-SAS using SAS/CONNECT to Liinux

 

We have v9.4 T3 on both PC and Linux Red Hat.  We can access Oracle databases running directly from Linux,  But the same code doesn't work when remote submitted from PC-SAS via SAS/CONNECT.

 

From Linux:

 

1          libname clinmrt oracle user = U0147647 password = XXXXXXX path = '@cadmartp' schema=clinmrt dbindex=no;

NOTE: Libref CLINMRT was successfully assigned as follows:

      Engine:        ORACLE

      Physical Name: @cadmartp

 

Remotely sumitted to Linux vai SAS/CONNECT:

 

ERROR: Could not load /applications/sas94/sas943home/SASFoundation/9.4/sasexe/sasora (35 images

       loaded)

ERROR: libclntsh.so.11.1: cannot open shared object file: No such file or directory

1    libname clinmrt oracle user = U0147647 password = XXXXXXX path = 'cadmartp' schema=clinmrt

1  ! dbindex=no;

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.

Super User
Posts: 3,260

Re: Unable to access Oracle DB from PC-SAS using SAS/CONNECT to Liinux

[ Edited ]

Looks like you missing some Oracle setup stuff via CONNECT signon. I'm guessing that the $ORACLE_HOME environment variable is not being set when you signon hence SAS can't find the Oracle executables - this only applies if you are using SAS/ACCESS to Oracle.

 

Try using the SYSEXIST SAS function to check this:

 

 

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

You may need to work with your SAS server administrator on this one. 

 

Occasional Contributor
Posts: 6

Re: Unable to access Oracle DB from PC-SAS using SAS/CONNECT to Liinux

In $SAS_HOME/SASFoundation/9.4/bin/sasenv_local add lines like the following:

export ORACLE_BASE=/sas/oracle (point to the base oracle location)
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1 (point to the oracle home)

 

# library path
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

 

 

Ask a Question
Discussion stats
  • 2 replies
  • 379 views
  • 0 likes
  • 3 in conversation