Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: -Determine OS in pl/sql package ?
Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1082986583.433593_at_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;
Hi Daniel,
Thank you for the reply. It is working but it is not elegant as you said.
Maybe someone else knows a better sollution.
Thanks againa,
Anneke
Received on Tue Apr 27 2004 - 00:18:38 CDT