Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Get Hostname
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)
-- BillyReceived on Tue Aug 23 2005 - 06:52:55 CDT
![]() |
![]() |