Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sqlplus prompt

Re: sqlplus prompt

From: John Strange <jstrange_at_imtn.dsccc.com>
Date: 1997/05/01
Message-ID: <5ka158$8fk@camelot.dsccc.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US