вівторок, 28 вересня 2010 р.

Making work SAS 9.2 and Oracle 11

I have to make SAS talk to Oracle today. I'm not very familiar with these products yet, and I was very unhappy that SAS 9.2 don't want work with Oracle client 11.2.

I made a quick search and not found anything valuable that could help me from the first site.
I take a look at the log file and found that module sasora, which SAS/ACCESS used to communicate with Oracle, could could not load libclntsh.9.so. Do search what the it is and found that this is library from Oracle Client version 9.

Who know who is wrong Oracle developers which does not have common library which could be reused across different version of client, or SAS who make direct link to Oracle 9 client library and since when didn't update sasora, to match with new versions. Who cares? This thing happens and I have to figure out how to solve that.

I try find how to install Oracle client version 9, but didn't found it on official Oracle website. For sure maybe this installation exists somewhere in the Oracle Download Center, but seems that this is very aging version and Oracle try to forgate about it. So I do the same, cross finger and create libclntsh.so.9.0 as soft link to libclntsh.so.11.1.

So far, so good.

Quick and Dirty Fix:

function fix_sas2ora_link()
  ln -s ${ORA_HOME}/lib/libclntsh.so.11.1 ${ORA_HOME}/lib/libclntsh.so
  ln -s ${ORA_HOME}/lib/libclntsh.so.11.1 ${ORA_HOME}/lib/libclntsh.so.9.0
Be very careful with such type of fixes, as nobedy know what happens.
Since I need this working today, I made decision leave with that.

Then couple hours after that I found on the SAS support forum page where described how to made quick fix that in more clean way.

Hurray, no need for dirty fixes any more.
Hopefully this is helps.

четвер, 16 вересня 2010 р.

Install CMake 2.6/2.8 on Fedora 8 in EC2 environment

I'm working with EC2 environment on public AMI that has preinstalled Fedora 8. Little bit old, but for most tasks, that I do, this is more than enough.

Week or two ago, I have to build C++ module, developed by third-party and place it to the EC2 instance. This module use CMake 2.6 for building, but EC2 environment has only CMake 2.4 as latest version that available through standard Yum repositories. Currently (as of September 2010) available version 2.8 of CMake, but I choose stick with version which source code required. This was mostly client requirements. After hour or so trying put downloaded package to standard location for binaries and documentation, I wrote small script, which hopefully would be helpful for others.

Here the content of script that do the job and install 2.6 version of CMake that available from CMake download page

Version for installing 2.6


# Download CMake package
wget http://www.cmake.org/files/v2.6/cmake-2.6.4-Linux-i386.tar.gz
# Extract content of archive
tar -xf cmake-2.6.4-Linux-i386.tar.gz

chmod 755 cmake-2.6.4-Linux-i386/bin/*

# Copy files to target location
cp cmake-2.6.4-Linux-i386/bin/* /usr/bin/
cp -R cmake-2.6.4-Linux-i386/doc/* /usr/share/doc/
cp -R cmake-2.6.4-Linux-i386/man/* /usr/share/man/
cp -R cmake-2.6.4-Linux-i386/share/* /usr/share/

# Cleanup original archive and extracted files
rm -f -R cmake-2.6.4-Linux-i386
rm -f cmake-2.6.4-Linux-i386.tar.gz

Version for installing 2.8


# Download CMake package
wget http://www.cmake.org/files/v2.8/cmake-2.8.2-Linux-i386.tar.gz
# Extract content of archive
tar -xf cmake-2.8.2-Linux-i386.tar.gz

chmod 755 cmake-2.8.2-Linux-i386/bin/*

# Copy files to target location
cp cmake-2.8.2-Linux-i386/bin/* /usr/bin/
cp -R cmake-2.8.2-Linux-i386/doc/* /usr/share/doc/
cp -R cmake-2.8.2-Linux-i386/man/* /usr/share/man/
cp -R cmake-2.8.2-Linux-i386/share/* /usr/share/

# Cleanup original archive and extracted files
rm -f -R cmake-2.8.2-Linux-i386
rm -f cmake-2.8.2-Linux-i386.tar.gz

Still not very familiar with Linux, so if you know best way of arrange files to standard Linux locations other then copying and setting permission, please let me know.
Any feedback are welcome.