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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Making database name part of SQL prompt in sqlplus

Re: Making database name part of SQL prompt in sqlplus

From: Scott Canaan <srcdco_at_ritvax.isc.rit.edu>
Date: Thu, 06 Jul 2000 16:36:08 -0400
Message-Id: <10550.111371@fatcity.com>


Put this in your glogin file:

set feedback off
set verify off
set echo off
column "value" new_value db_name noprint column "user" new_value you_are noprint
select
substr(global_name,1,decode(instr(global_name,'.'),null,length(global_name), instr(global_name,'.') - 1)) "value", user "user" from sys.global_name;
set sqlprompt '&you_are in &db_name.>'
set feedback on

Jay Weinshenker wrote:

> Anyone know how to do it?
>
> I've got a number of users doing SQL*Plus work and they keep making errors
> as to which instance they are in...
>
> Anyone?
>
> J
>
> --
> Author: Jay Weinshenker
> INET: jweinshe_at_concentric.net
>
> 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: ListGuru_at_fatcity.com (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).

--
Scott Canaan (srcdco_at_rit.edu)
"Life is like a sewer, what you get out of it depends on what you put into it"
Received on Thu Jul 06 2000 - 15:36:08 CDT

Original text of this message

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