On Fri, 9 Feb 2001, Mark Leith wrote:
> Jared,
>
> Cool little trick with your SQL prompt there, care to share how you did it?
>
> Cheers
>
> Mark
Here's the script:
REM setprmpt.sql - unix version
REM set prompt to first 3 chars of machine,name, database name, user name
-- thanks to ted moore for the non-spooling version of this
-- This SQL*Plus login script will set the SQL prompt to the Oracle SID
--
column cmachine noprint new_value umachine
column csid noprint new_value instance_var
set pause off feed off term off
select
lower(substr(global_name,1,instr(global_name,'.')-1)) csid
from global_name
/
column cuser noprint new_value who_var
select lower(user) cuser from dual
/
set sqlprompt '&who_var@&instance_var SQL> '
set termout on feed on head on
set time on
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).