Move this to the appropriate forum if necessary.

Sambavan posted a question earlier about firing a message to the users screen when they login in. (http://www.dbasupport.com/forums/showthread.php?threadid=16324)

Here is a piece of code I added to my glogin.sql. I frequently logon to multiple databases on multiple machines. I was having a hard time keeping track of which username/instance/machine I was connected to. (Multiple windows all with the SQL>). This piece of code will automatically put the username followed by the machine I connected to as the sql prompt.

set termout off
spool set_prompt.sql
select 'set sqlprompt'||' "' || a.username ||'-'|| b.terminal ||'> "'
from v$session a, v$process b
where a.paddr = b.addr
and a.sid = (select sid from v$session_connect_info);
spool off
start set_prompt.sql
set termout on

Hope you like it. Hope it helps.