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: sqlplus prompt

Re: sqlplus prompt

From: Peter H. Larsen <petlars_at_ibm.net>
Date: 1996/12/18
Message-ID: <01bbec8a$0657f410$03000181@phl>#1/1

janet <janet_at_telesph.com> wrote in article <32B5A19E.527B_at_telesph.com>...
> I don't know about the database name (i.e. sales or people)
> but here's how to get the userid in the prompt:

You get the database from SYS.V$DATABASE (it always contain ONE row describing the current instance). You can get the instance-name from this table, and put it into you statement below.

>
> in your login.sql add these lines:
>
> column userid noprint new_value myname
> select user userid from dual;
> set sqlprompt &&myname>
>
> this will give you user and > for an sqlplus prompt.
>
> HTH
> janet

-- 
// Complete Data Service
// Peter H. Larsen
// PETLARS_at_IBM.NET
Received on Wed Dec 18 1996 - 00:00:00 CST

Original text of this message

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