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

Home -> Community -> Usenet -> c.d.o.server -> Re: Get Hostname

Re: Get Hostname

From: Chuck <skilover_nospam_at_softhome.net>
Date: Tue, 23 Aug 2005 11:36:24 GMT
Message-ID: <1124796984.8258444456aa4f01c69a726ffa1e9949@bubbanews>


"Billy" <vslabs_at_onwe.co.za> wrote in news:1124797975.103636.262970 @o13g2000cwo.googlegroups.com:

> 10G (10.1.0.3)
> Linux/HP-UX/Solaris
>
> Is there a DBMS package call that I'm missing that will give me the
> current Oracle server platform's hostname? SYS_CONTEXT only provides
> the client machine's (if applicable) details.
>
> I've done this in the past via extproc call to gethostname (libc.sl if
> I'm not mistaken) - but that introduces a lot of additional complexity
> (extproc, environment etc). And with machines running in the "wild" I
> want to minize the number of moving parts and complexities.
>
> An alternative is to parse and tokenise the PROGRAM column in V$PROCESS
> for someting like PMON or SMON and extract the hostname from there..
> how safe is that? (should not be a problem IMO)
>
> --
> Billy
>

No package needed...

select host_name from v$instance; Received on Tue Aug 23 2005 - 06:36:24 CDT

Original text of this message

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