Re: Setting SQL*Plus Prompt

From: Ron Strouss <rstrouss_at_ix.netcom.com>
Date: 1996/12/10
Message-ID: <58k1fk$2mk_at_dfw-ixnews10.ix.netcom.com>#1/1


David Stark <david_stark_at_mentorg.com> wrote:

>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

David,

I was asking myself the same questions lately as we've had a dramatic increase in databases in our shop. We have an ORACLE consultant on site for a project so I thought I'd ask him. He said it can't be done and he's even personally tied to do it with no success. I'm not going to mention his name to spare him any embareassment! :) ....
>

I have a DBA login script that connects me to the database and sets the prompt the way you like. It's the same but different from some of the other posts in this thread ...
>

I call it 'dba_connect.sql' :

  set termout off;
  connect system/xxxxxx;
  col name new_value DB_NAME;
  select name from v$database;
  set sqlprompt '&DB_NAME SQL>';
  set termout on;

The part I didn't know before reading this thread was that you can put a variable name in side the single quotes which define the prompt string!.

Thanks for the posts ...

Regards,
Ron Strouss
DARIGOLD, Inc.
Seattle, WA Received on Tue Dec 10 1996 - 00:00:00 CET

Original text of this message