Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sqlplus prompt
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.NETReceived on Wed Dec 18 1996 - 00:00:00 CST
![]() |
![]() |