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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SET SQL Prompt automatically??

Re: SET SQL Prompt automatically??

From: MohammedB <mohammedbNOmoSPAM_at_iadb.org.invalid>
Date: Mon, 07 Feb 2000 08:57:49 -0800
Message-ID: <35476c3e.85e04aea@usw-ex0103-019.remarq.com>


In your glogin.sql file located in $ORACLE_HOME/sqlplus/admin, place these lines:

set verify off
set termout off

column value new_value _sid
select substr(global_name,1,instr(global_name,'.') - 1) as value from global_name;

set sqlprompt '&_sid SQL> '

set termout on
set verify on

Login to sqlplus and you'll have your sql prompt set.

Thanks to (I think) Sybrand Bakker on helping me out on this a couple months ago when I posted a similar query.

hth

mkb

In article <87mpm8$kf$1_at_porthos.nl.uu.net>, "John Neus" <john.neus_at_superconsult.nl> wrote:
>Hello,
>
>I would like to set my prompt in Oracle SQL*Plus . Suppose I
have 2
>environments: development and production.
>Therefore I would like to have 2 batchfiles which both run
Oracle SQL*Plus;
>
>batchfile 1: automatically connection to the Development
environment and
>with automatically prompt: DEV>
>batchfile 2: automatically connection to the Production
environment and
>with automatically pompt PRO>
>
>I know this is possible by a making the batchfiles, but how ?
>
>Thanks
>
>John
>
>
>
>
>
>

Received on Mon Feb 07 2000 - 10:57:49 CST

Original text of this message

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