Having SQLPlus installed on your Mac is very handy! Follow the steps below to install it.
1. First you’ll need to go to Oracle’s website (http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html) to download the following files:
instantclient-basic-10.2.0.4.0-macosx-x86.zip
instantclient-sqlplus-10.2.0.4.0-macosx-x86.zip
2. After the downloads are complete, move the two new zip files to an alternate location like ~/Downloads/Oracle.
# cd ~/Downloads; mkdir Oracle; mv instantclient-*.zip Oracle; cd Oracle
3. Unzip these 2 zip files.
# cd ~/Downloads/Oracle
# for file in `ls -1 *.zip`; do unzip $file; done
4. Next move the newly created instantclient_10_2 directory to /Applications.
# mv instantclient_10_2 /Applications
5. Update your ~/.bash_profile to update some variables Oracle expects to be present in order for sqlplus to operate correctly. These should go at the end of your .bash_profile so as not to
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/Applications/instantclient_10_2; DYLD_LIBRARY_PATH
TNS_ADMIN=/Applications/instantclient_10_2/network/admin; export TNS_ADMIN
PATH=$PATH:/Applications/instantclient_10_2; export PATH
6. Source the file so the variables can be picked up by the shell:
# source ~/.bash_profile
7. Copy or create your tnsnames.ora file in /Applications/instantclient_10_2/network/admin/.
8. If steps 1-7 were completed successfully, you can start sqlplus like so:
sqlplus sys/password@MYDB