Wednesday, March 05, 2008

Oracle Environment shell script on Ubuntu

I install Oracle 10g Express edition in my Ubuntu machine from oracle-xe_10.2.0.1-1.0_i386.deb
Before that you need to install a library : libaio1 .

To run sqlplus you need to run a shell script first to update your environment variables. The script is at /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh .
But I got this error line twice each time I run the script.

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh: 114: [[: not found


You need to edit the /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh
at these lines :

if [[ -n "$LC_ALL" ]]; then
locale=$LC_ALL
elif [[ -n "$LANG" ]]; then

Edit [[ to [ and ]] to ] , so it will be like these :

if [ -n "$LC_ALL" ]; then
locale=$LC_ALL
elif [ -n "$LANG" ]; then


Actually I don't know is there any side effect but as long as I use it there is no problem with my revised nls_lang.sh .
So, if you have any better solusion please comment this post. Thank you.
Post a Comment