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: Burt Peltier <burttemp1REMOVETHIS_at_bellsouth.net>
Date: Sun, 2 May 2004 15:00:40 -0500
Message-ID: <IYblc.6875$983.4428@bignews1.bellsouth.net>


We use a PlSql function that runs the following query which seems reliable, so far ....

I am guessing it is not full proof. Although I haven't checked, it seems it is more accurate to say this is telling you the OS and version of the LISTENER. But, then again, at least the OS would be the same anyway for any combination of listener / database.

 Select Banner
   From V$version
  Where Upper(Banner) Like 'TNS%';

... Unix vs. Solaris example output follows ....

14:24:50 SQL> connect id/pw_at_sundb
Connected.

14:24:53 SQL>  Select Banner
14:24:57   2     From V$version
14:24:57   3    Where Upper(Banner) Like 'TNS%'
14:24:58   4  /

BANNER



TNS for Solaris: Version 8.1.7.4.0 - Production

14:24:59 SQL>
14:25:04 SQL> connect id/pw_at_windb
Connected.
14:25:16 SQL>
14:25:16 SQL> l
  1 Select Banner
  2 From V$version
  3* Where Upper(Banner) Like 'TNS%'
14:25:18 SQL> / BANNER



TNS for 32-bit Windows: Version 8.1.7.4.0 - Production

14:25:18 SQL>

-- 

"Andre" <avanrossem_at_hotmail.com> wrote in message
news:4d32d1be.0404262122.6ae83050_at_posting.google.com...

> 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
Received on Sun May 02 2004 - 15:00:40 CDT

Original text of this message

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