Oracle SQLPlus – Default Define Settings

oracleoracle-10gsqlplus

My workstation is Ubuntu 14.04. I have Oracle Express 11g installed. Whenever i run the define command in SQLPlus, is see the define _editor = "ed". Is there a way to change that permanently to gedit instead of defining my preferred editor with every new session.

Best Answer

There are 2 ways of doing this.

Edit your shell dot file (.profile, .bash_profile etc) to add:

export EDITOR=gedit

Or, you can create the sqlplus equivalent of a Unix dot file. Create a file called glogin.sql and place it in $ORACLE_HOME/sqlplus/admin, then add this to it:

DEFINE _EDITOR=gedit