Friday, August 3, 2012

Installing Oracle SQL*Plus on Mac OS X Lion

This is just a small article how I got Oracle SQL*Plus installed on Mac OS X Lion.

The most important thing is not to download the 64 bit files as this is broken on OS X Lion, plain and simple, use the 32 bit version.

Step 1 - Get the software you need

Files I downloaded (you need an Oracle dev account) were;

  1. instantclient-basic-10.2.0.4.0-macosx-x86.zip
  2. instantclient-sqlplus-10.2.0.4.0-macosx-x86.zip
  3. instantclient-jdbc-10.2.0.4.0-macosx-x86.zip

Step 2 - Install the software

  1. Create a folder where you want to unzip instantclient zip's to, I used "/Users/munchy/dev/oracle" as the root folder into which I unzipped the files
  2. Unzip the downloaded files all in the same place

Step 3 - Set Environment properties

  1. Create or edit the file ~/.profile adding the following 

export ORACLE_HOME=/Users/H06810659/dev/oracle
export DYLD_LIBRARY_PATH=$ORACLE_HOME/instantclient_10_2x32
export TNS_ADMIN=$ORACLE_HOME/network/admin

export PATH=$PATH:$DYLD_LIBRARY_PATH

Step 4 - TNSNAMES.ora

  1. Create a tnsnames.ora file in the folder you define in your system property TNS_ADMIN 

The End

Thats it open terminal and connect to your chosen Oracle database e.g. sqlplus system/password@xe

No comments:

Post a Comment