Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus prompt
create a file called login.sql
rem /********************************************************************* rem * rem * login.sql - sqlplus start up file rem * rem * next seven statements sets the sql prompt = user and oracle instance.rem *
rem *********************************************************************/
column sid new_value osid noprint
column usr new_value ousr noprint
set termout off
select lower (substr (global_name, 1, (instr (global_name, '.') -1))) sid
from global_name ;
select user usr from dual ;
set termout on
set sqlprompt '&ousr &osid> '
rem /****************** end login.sql ***********************/
Add it`s location to the SQLPATH environment variable, example SQLPATH=$HOME/sql:$SQLPATH; export SQLPATH
Now, login into sqlplus and start hacking.
Rich Headrick (r4bhead_at_pacbell.com) wrote:
: How does one change the default sqplus prompt to be = to current SID?
: Please email.
: rich
-- This posting represents the personal opinions of the author. It is not the official opinion or policy of the author's employer. Warranty expired when you opened this article and I will not be responsible for its contents or use.Received on Thu May 01 1997 - 00:00:00 CDT