Thursday, April 1, 2010

SQLPlus options

So, for the truly geeky, you can "pass" in parameters to alter the default environment/behavior of sqlplus. The orafaq page helped me figure this out:
  • create a login.sql file for all your commands
  • add the directory to the $SQLPATH env variable (on most client machines, you'll need to create the env var)
  • launch sqlplus, and you should have all your options setup
My current login.sql looks like this:

define _editor=emacs
set timing on
set serveroutput on
set colsep '|'
set linesize 120

Like I said, for the geeky, but damn handy when you don't want to muck with and IDE like TOAD.

No comments: