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 -> Get Hostname

Get Hostname

From: Billy <vslabs_at_onwe.co.za>
Date: 23 Aug 2005 04:52:55 -0700
Message-ID: <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
Received on Tue Aug 23 2005 - 06:52:55 CDT

Original text of this message

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