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: - determine Operating system using pl/sql??

Re: - determine Operating system using pl/sql??

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Tue, 27 Apr 2004 15:37:43 +1000
Message-ID: <408df1a1$0$12740$afc38c87@news.optusnet.com.au>


Andre wrote:
> Hello all,
>
> I've written a pl/sql package. Within this package I want to know if
> the Operating system on which the Database is running is UNIX or
> Windows-based.
>
> Is there a way to do this?
>
> regards,
> Anneke
> The Netherlands

Well, one way I've used (but I daresay there are better ways of doing it...) is to select PROGRAM from v$session. On a Windows system, you'll see lots of ORACLE.EXE program entries for the background processes.

For a Linux system, on the other hand, you'll see entries like "oracle_at_suse73 (PMON)" as each background process is listed.

In short, search for the string ".EXE", and if you find it, you're on Windows. If you don't, you're using a proper operating system!

Regards
HJR Received on Tue Apr 27 2004 - 00:37:43 CDT

Original text of this message

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