Message-Id: <10550.111382@fatcity.com> From: Deborah Lorraine Date: Thu, 06 Jul 2000 16:48:27 -0700 Subject: Re: Making database name part of SQL prompt in sqlplus --=====================_1757839569==_.ALT Content-Type: text/plain; charset="us-ascii"; format=flowed Here's our glogin.sql which sets the prompt: rem SQL*Plus global login startup file. rem rem Set the SQL prompt to include the database name rem selected from v$parameter rem rem set feedb on echo on set termout off column value noprint new_value dbname select value from v$parameter where name = 'db_name' / set sqlprompt "&dbname:SQL>" column value print rem rem Issue a commit to clear transaction buffer in case rem the user wants to do a 'set transaction ...' rem commit / def _editor=vi set newpage 0 set pagesize 23 set numwidth 7 set pause on pause '[4mPress enter to continue or ^C to stop[5m...[m' rem rem Invoke users '.sqlrc' file if it exists rem @$HOME/.sqlrc set termout on At 12:26 PM 7/6/00 , you 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@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@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). --=====================_1757839569==_.ALT Content-Type: text/html; charset="us-ascii" Here's our glogin.sql which sets the prompt:

rem  SQL*Plus global login startup file.
rem
rem  Set the SQL prompt to include the database name
rem  selected from v$parameter
rem
rem set feedb on echo on
set termout off
column value noprint new_value dbname
select value
from v$parameter
where name = 'db_name'
/
set sqlprompt "&dbname:SQL>"
column value print
rem
rem  Issue a commit to clear transaction buffer in case
rem  the user wants to do a 'set transaction ...'
rem
commit
/

def _editor=vi
set newpage 0
set pagesize 23
set numwidth 7
set pause on pause '[4mPress enter to continue or ^C to stop[5m...[m'
rem
rem   Invoke users '.sqlrc' file if it exists
rem
@$HOME/.sqlrc
set termout on



At 12:26 PM 7/6/00 , you 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@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@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