Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Get Hostname
"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
![]() |
![]() |