Digital Sanctum

software development, technology and other square topics

Installing Oracle Instant Client on Mac OS X

with 4 comments

Installing Oracle Instant Client on Mac OS X



Getting right down to business...

  1. Download the Instant Client Packages (4 files)
  2. Unzip the files into instantclient10_1
    CODE:
    1. unzip instantclient-basic-macosx-10.1.0.3.zip
    2. unzip instantclient-sqlplus-macosx-10.1.0.3.zip
    3. unzip instantclient-sdk-macosx-10.1.0.3.zip
    4. unzip instantclient-jdbc-macosx-10.1.0.3.zip

  3. Create two symbolic links for the files that have the version appended. This is so the Ruby OCI8 driver can find what it’s looking for.
    CODE:
    1. cd instantclient10_1
    2. ln -s libclntsh.dylib.10.1 libclntsh.dylib
    3. ln -s libocci.dylib.10.1 libocci.dylib
    4. cd ..

  4. Create directory /usr/local/oracle and then copy instantclient10_1 into it
    CODE:
    1. sudo mkdir /usr/local/oracle
    2. sudo mv instantclient10_1 /usr/local/oracle/instantclient10_1

  5. Open the system /etc/profile
    sudo pico /etc/profile
  6. Add these lines to /etc/profile
    CODE:
    1. DYLD_LIBRARY_PATH="/usr/local/oracle/instantclient10_1"
    2. export DYLD_LIBRARY_PATH
    3. SQLPATH="/usr/local/oracle/instantclient10_1"
    4. export SQLPATH

    Add /usr/local/oracle/instantclient10_1 to your PATH while you have /etc/profile open. Then save it.

  7. Reload your profile

    source /etc/profile
  8. Test it out with the sqlplus command line app.
    CODE:
    1. sqlplus [username][/password]@//[hostname][:port][/database]

If you can connect with that, then you’re good to go.

Written by Shane

July 26th, 2007 at 10:57 am

4 Responses to 'Installing Oracle Instant Client on Mac OS X'

Subscribe to comments with RSS or TrackBack to 'Installing Oracle Instant Client on Mac OS X'.

  1. Thanks! Now all we need is Toad for Mac Os X… :-)

    BOK

    9 Aug 07 at 3:46 pm

  2. Sorry, i did what you said and when trying to connect to my db i got the error message:

    dyld: Library not loaded: /b/729/sqlplus/lib/libsqlplus.dylib
    Referenced from: /usr/local/oracle/instantclient10_1/sqlplus
    Reason: image not found
    Trace/BPT trap

    any ideas?

    Peter

    8 Nov 07 at 12:20 pm

  3. Shane

    10 Nov 07 at 9:17 am

  4. Thank you! Great instructions - everything worked perfectly.

    Tom C

    21 Jan 08 at 2:54 pm

Leave a Reply