Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Three SQL*Plus Questions
On 19 Feb 1998 19:24:48 GMT, random_at_interaccess.com (Brett Neumeier) wrote:
>Frank Hubeny (fhubeny_at_ntsource.com) wrote:
>: I don't believe the following are possible to do in either plus33w.
>: Are they possible in plus80w?
>:
>: 1) Can I dynamically change the prompt from "SQL>" to the username of
>: the user to whom I am connected at the moment? That is, if I connect as
>: user SYSTEM, then "SYSTEM>" would appear as the prompt without my having
>: to do anything but make the connection.
>
>Actually I think you can do something like this.
>
>There's a SQL file that is automatically run when you start
>SQLPLUS. I don't remember, unfortunately, what it's called or
>where it needs to be. But I suspect that if you put the
>following code in such a file, it will work just fine:
>
>---snip
>set feedback off
>set termout off
>col curr_user new_value current_user
>select user curr_user from dual;
>set feedback on
>set termout on
>set sqlprompt "&¤t_user> "
>---snip
>
The file is the login.sql file, and I think it just needs to be in your path somewhere.
Grue
grue_at_stopspam.hotmail.com
Note: If replying via email, please remove "stopspam." from address (SPAM protection). Thanks. Received on Thu Feb 19 1998 - 00:00:00 CST
![]() |
![]() |