Re: Setting SQL*Plus Prompt
From: Joel Garry <joelga_at_rossinc.com>
Date: 1996/12/09
Message-ID: <1996Dec9.234335.14690_at_rossinc.com>#1/1
Date: 1996/12/09
Message-ID: <1996Dec9.234335.14690_at_rossinc.com>#1/1
In article <32A8B729.36A9_at_mentorg.com> David Stark <david_stark_at_mentorg.com> writes:
>I need to set the SQL*Plus prompt to the current SID. Is there an easier
>way other than granting read access to the v$database view?
>
>Thanks in advance
rem /********************************************************************* rem * rem * login.sql - sqlplus start up file rem * rem * next four statements sets the sql prompt = oracle instance.rem *
rem *********************************************************************/
column sid new_value osid noprint
select lower (substr (global_name, 1, (instr (global_name, '.') -1))) sid
from global_name ;
set sqlprompt '&osid> '
Of course, that is the database name, which is what you wanted, right? Or are you asking an MTS question?
rem /********** end of login.sql ***********************/ -- Joel Garry joelga_at_rossinc.com Compuserve 70661,1534 These are my opinions, not necessarily those of Ross Systems, Inc. <> <> %DCL-W-SOFTONEDGEDONTPUSH, Software On Edge - Don't Push. \ V / panic: ifree: freeing free inodes... OReceived on Mon Dec 09 1996 - 00:00:00 CET