Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: -Determine OS in pl/sql package ?

Re: -Determine OS in pl/sql package ?

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Mon, 26 Apr 2004 06:36:26 -0700
Message-ID: <1082986583.433593@yasure>


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

Hopefully there is a more elegant way but ...

SELECT COUNT(*)
INTO i
FROM v_$version
WHERE INSTR(banner, 'Windows', 1, 1) = 1;

IF i = 1 THEN

    ... it is Windows
END IF;

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Mon Apr 26 2004 - 08:36:26 CDT

Original text of this message

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