| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: - determine Operating system using pl/sql??
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
![]() |
![]() |