Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Re: return hostname in PL/SQL

Re: Re: return hostname in PL/SQL

From: Jose Harvey <harvey_at_web.de>
Date: Tue, 23 May 2000 17:27:36 +0200
Message-Id: <10506.106384@fatcity.com>


 Charlie Mengler schrieb am 23.05.00:
> Here is what I did just yesterday -
>
> HTH!
>
> DECLARE
> CURSOR machine_cur IS
> select machine from v$session
> where program like '%PMON%';
>

Hi,
but what if your server is running on an non-unix-machine? On NT, your program would be ORACLE80.EXE (not like '%PMON%').

I would select from v$session where TYPE = 'BACKGROUND' for this purpose.

If you only want the host name, it would be better to select TERMINAL; again, on NT you get for machine 'DOMAIN\HOSTNAME' rather than 'HOSTNAME'.

Cheers,

Jose



1.000.000 DM gewinnen - kostenlos tippen - http://millionenklick.web.de IhrName@web.de, 8MB Speicher, Verschluesselung - http://freemail.web.de Received on Tue May 23 2000 - 10:27:36 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US