Skip to content

Instantly share code, notes, and snippets.

@datalove
Last active December 2, 2017 02:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save datalove/05e7dde56284ea9e9a00 to your computer and use it in GitHub Desktop.
Save datalove/05e7dde56284ea9e9a00 to your computer and use it in GitHub Desktop.
ROracle on OS X

Running ROracle on OSX

Installing Oracle Instant Client

Go to http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html and look for something like this:

Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications Download instantclient-basic-macos.x64-11.2.0.4.0.zip (62,794,903 bytes)

Once the file is downloaded, follow the instructions at the bottom of the download page (reproduced below)

1. Download the desired Instant Client ZIP files. All installations require the Basic or Basic Lite package.

2. Unzip the packages into a single directory such as "/opt/oracle/instantclient_11_2" that is accessible to your application.

3. Create the appropriate libclntsh.dylib and libocci.dylib links for the version of Instant Client. For example:

cd /opt/oracle/instantclient_11_2
ln -s libclntsh.dylib.11.1 libclntsh.dylib
ln -s libocci.dylib.11.1 libocci.dylib

4. Set the environment variable DYLD_LIBRARY_PATH to the directory created in Step 2, for example:

export DYLD_LIBRARY_PATH=/opt/oracle/instantclient_11_2:$DYLD_LIBRARY_PATH

5. To use supplied binaries such as SQL*Plus, update your PATH environment variable, for example:

export PATH=/opt/oracle/instantclient_11_2:$PATH

6. Start your application.

Installing ROracle package from source

stuff

https://stackoverflow.com/questions/19286400/roracle-64bit-install-on-macosx-10-8-mountain-lion

Install Oracle XE 11g on OSX

Follow these instructions: https://github.com/hilverd/vagrant-ubuntu-oracle-xe

Once complete vagrant finishes, you can log in by doing

vagrant up
vagrant ssh

And once inside vagrant, do the following to log into Oracle XE

sqlplus system/manager@//oracle:1521/XE

And to unlock access to the HR schema, do the following:

ALTER USER HR IDENTIFIED BY hr ACCOUNT UNLOCK;
quit

Now login like so sqlplus hr/hr@//oracle:1521/XE

And test to make sure it works:

select * from employees;
quit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment