if you just want to get hostname from database, you can do this:
select machine from v$session where rownum<2;

03-04-2002, 05:22 PM

kris109

select host_name from v$instance;

03-04-2002, 06:11 PM

Shestakov

If u want, than each sqlplus user have anything special in command promt u should:

-- use glogin.sql file for setup prompt line
-- use query that can get machine name and OS user name from session
for example:
select SID,OSUSER,MACHINE from v$session where sid = ( select distinct sid from v$mystat );
...