I use SQLcl a lot and install it on every environment I work on. It’s fully compatible with SQL*Plus and has useful extensions to interact with OCI, Autonomous Databases and Data Pump.

My SQLcl configuration file is named ’login.sql’ and located in the ‘~/work’ directory. I also keep my ’tnsnames.ora’ file here.

The location of these two Oracle configuration files is configured in ‘~/.bashrc’.

# Oracle TNS location
export TNS_ADMIN=$HOME/work

# SQLCL login file
export SQLPATH=$HOME/work

This is my SQLcl configuration file.

set editor emacs
set statusbar on
set statusbar add timing
set sqlformat ansiconsole
set highlighting on
set highlighting keyword foreground green
set highlighting identifier foreground magenta
set highlighting string foreground yellow
set highlighting number foreground cyan
set highlighting comment background white
set highlighting comment foreground black

Sample output

SQL> select count(*) from dba_objects;

COUNT(*)
___________
358710

emacs ¦ 1:0 ¦ BILLY ¦ EDA_DEMO ¦ 00:00:00.953