Using gqlplus with Instant Client on Mac OS X
Posted by chris on Sep 15th, 2008
I need to use Oracle’s SQL*Plus quite often from my Mac but Oracle’s support for OS X is sketchy to say the least. You can’t install the proper client on Intel machines, so you have to use the Instant Client instead. I also want to use gqlplus, which adds things like a command history to SQL*Plus. (You may be amused to know that SQL*Plus was once called UFI, meaning “User Friendly Interface”, not sure how it could be made less friendly really). After a bit of trial and error, I got it working. This is how I have it set up:
- I installed instantclient into its own directory
- I added this directory to PATH and to both LD_LIBRARY_PATH and DYLD_LIBRARY_PATH environment variables
- I put tnsnames.ora and login.sql (for commands to be run at login time) in my home directory
- I pointed the TNS_ADMIN and SQLPATH environment variables to my home directory
- I built and installed gqlplus in /usr/local/bin
I have also set up an alias so that gqlplus runs with the -d flag. This turns off the auto-completion which can make gqlplus slow to load.

December 16th, 2008 at 2:29 pm
Strange, I didn’t have any problems – having previously installed instant client I simply ran:
./configure && make
to build GQL*PLus. Don’t run ‘sudo make install’ as it fails however and the README says not to bother anyway! Simply copy the executable to your chosen location, e.g. $HOME/bin