Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Who knows the answer?
A copy of this was sent to "Wim Teuwens" <Wim.Teuwens_at_Technum.Be>
(if that email address didn't require changing)
On Thu, 23 Sep 1999 15:11:15 +0200, you wrote:
>Is it not possible to change the prompt at login ?
>
Yes it is. I've been using:
column global_name new_value gname
set termout off
select lower(user) || '@' ||
decode(global_name, 'ORACLE8.WORLD', '8.0', 'ORA8I.WORLD',
'8i', global_name ) global_name from global_name;
set termout on
set sqlprompt '&gname> '
in my login.sql for a while now. If you use global_names in a meaning way (alter database rename global_name...), this works well. In my case above, i'm using decode to 'friendly name' my 2 most used databases and just use the global name for the rest.
if you set your SQLPATH environment to point to where the login.sql resides -- your prompt will have your username and database in it. I setup a small connect.sql script and put it in my sqlpath as well so I can:
tkyte_at_8i> @connect scott/tiger
Connected.
scott_at_8i>
get the prompt updated when I connect as someone else. connect.sql just has:
connect &1
@login
in it.
>Antonio Pascual <apa_at_jerez.micro.lucent.com> wrote in message
>news:7sctet$bhv_at_nntpb.cb.lucent.com...
>> This is a stupid question, but I don't know the answer and I've couldn't
>> find
>> anyone who knows it.
>> Imagine.
>> I have in my Unix workstation 3 or 4 sqlplus opened sessions. Each of one,
>> connected to a different host,
>>
>> SESSION 1: sqlplus user1/pass1_at_host1
>> SESSION 2: sqlplus user2/pass2_at_host2
>> SESSION 3: sqlplus user3/pass3_at_host3
>>
>> I go to lunch, and when I back, I don't know what session is 1, or 2 or 3.
>> How could i know the host for each session.
>>
>> With the command, shows the user
>> SQL> show user
>> user is user1
>>
>> but, if the user is equal for all sessions?.
>>
>> Thanks.
>>
>>
>>
>
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Sep 23 1999 - 08:34:53 CDT
![]() |
![]() |