| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Determining UNIX hostname from PL/SQL
Is there a good way of determinig the name of a UNIX host from within
PL/SQL code? I have code that needs to run on numerous machines and do
slightly different things on each and I'd like to have a single copy of the
source. I've played with "select machine from v$session where sid=1" and it
appears to always work, but I'm not sure I can rely on it. An alternative
would be to determine the instance name since they are different on every
machine.
I'm also aware that I could probably read the hosts file (or some other OS specific file that would contain the hostname), but I don't consider that to be much better than having different source files. Thanks.
-Tim
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Feb 01 1999 - 17:22:09 CST
![]() |
![]() |