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