Re: Customizing SQL prompt??

From: Peter Scheer <gio_at_wazoo.keba.co.at>
Date: 2 Sep 94 13:44:52 GMT
Message-ID: <957_at_wazoo.keba.co.at>


In article <30AUG94.23571453_at_nauvax.ucc.nau.edu> kkc_at_nauvax.ucc.nau.edu writes:

hallo Kathy,
this does not work, because sqlplus does not substitute shell-variables. A possible solution is putting

rem =================== cut hers ============================
rem	login.sql

set termout off

col sid new_value osid noprint

select value sid
from v$parameter
where name = 'db_name';

set termout on

set sqlprompt "&osid >"

rem =================== cut hers ============================

into your (g)login.sql. But if you connect to another database, the display is wrong!

hope this helps , anyway

Gio

>I am attempting to customize (like I don't have a million other things to do)
>the SQL prompt. I have modified login.sql and used the set sqlprompt command
>but I cannot seem to get SQL to accept the unix variable $ORACLE_SID in any
>form (%,&,',etc, etc), nor can I find the SQL system variable for db_name to
>assign sqlprompt. In other words, this isn't working:
> set sqlp $ORACLE_SID> (why?)
>

Johannes Leitner c/o "gio"
KEBA, Gewerbepark, A-4041 Linz, Austria, Europe VOICE: 0043-732-7090-930 FAX: 0043-732-730910 gio_at_keba.co.at ...!uunet!mcsun!hp4at!keba!gio Received on Fri Sep 02 1994 - 15:44:52 CEST

Original text of this message