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: getting global_name at SQL*Plus prompt

Re: getting global_name at SQL*Plus prompt

From: Thomas Pall <tpall_at_bga.com>
Date: 25 Oct 98 20:27:24 GMT
Message-ID: <363389ac.0@feed1.realtime.net>


I use this to set the prompt as user_at_global_name>

column glob_user new_value usr noprint
select user||'@'
glob_user
  from global_name;
column glob_user clear
column glob_db new_value db noprint
select value||'>'
glob_db
  from v$parameter where name='db_name'; set sqlprompt '&usr&db'
column glob_db clear

A problem with it is that if you disconnect and reconnect, the prompt does not change.

mkaushik_at_harvestinc.com wrote:

: > I'm interested in getting the instance and schema name
: > to appear an a SQL*Plus prompt. I've received a number
: > of methods to do this,

: I have been trying to find out how to get the instance and
: schema name to appear as SQL*Plus prompt. Would appreciate
: it if you could post that information.
: Thanks,
: Malini

: In article <362DB96C.855892C1_at_bigfoot.com>,
: Doug Cowles <dcowles_at_us.ibm.com> wrote:
: > I'm interested in getting the instance and schema name
: > to appear an a SQL*Plus prompt. I've received a number
: > of methods to do this, all which work upon the first login,
: > which uses the login.sql script. Problem is...
: > if I reconnect from SQL*Plus like
: > conn scott/tiger_at_somewhereelse
: > the prompt will maintain the old information.
: > Does anyone know a way around this?
: > Thanks in advance,
: >
: > Doug Cowles.
: >
: >

: -----------== Posted via Deja News, The Discussion Network ==----------
: http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

-- Received on Sun Oct 25 1998 - 14:27:24 CST

Original text of this message

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