Skip to main content

Install SQL*Plus 12.2 on a Mac

Published: 2019-06-07 | Lastmod: 2019-10-11

Also see: Install SQL*Plus on Linux.

SQL*Plus Version 12.2.0.1.0 #

  1. Navigate to Oracle downloads, accept the license agreement, and login. If you don’t already have an Oracle account, you’ll need to create one
  2. Download these zip files:
    1. instantclient-basic-macos.x64-12.2.0.1.0-2.zip
    2. instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
  3. Make dir for instant client then unzip zips

    mkdir -p ~/bin/oracle
    unzip -d ~/bin/oracle instantclient-basic-macos.x64-12.2.0.1.0-2.zip
    unzip -d ~/bin/oracle instantclient-sqlplus-macos.x64-12.2.0.1.0-2.zip
    
  4. The file listing of that dir should now look like:

    $ cd  ~/bin/oracle/instantclient_12_2 && find . -type f | sort
    ./BASIC_README
    ./SQLPLUS_README
    ./adrci
    ./genezi
    ./glogin.sql
    ./libclntsh.dylib
    ./libclntsh.dylib.12.1
    ./libclntshcore.dylib.12.1
    ./libnnz12.dylib
    ./libocci.dylib
    ./libocci.dylib.12.1
    ./libociei.dylib
    ./libocijdbc12.dylib
    ./libons.dylib
    ./liboramysql12.dylib
    ./libsqlplus.dylib
    ./libsqlplusic.dylib
    ./ojdbc8.jar
    ./sqlplus
    ./uidrvci
    ./xstreams.jar
    
  5. Add this line to your bash config file, e.g. ~/.bash_profile, to add sqlplus to your PATH

    export LD_LIBRARY_PATH=$HOME/bin/oracle/instantclient_12_2:$LD_LIBRARY_PATH
    export PATH=$LD_LIBRARY_PATH:$PATH
    
  6. Source your ~/.bash_profile

    source ~/.bash_profile
    
  7. Run sqlplus -V to confirm it’s installed