Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: - determine Operating system using pl/sql??
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
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
14:25:18 SQL>
-- "Andre" <avanrossem_at_hotmail.com> wrote in message news:4d32d1be.0404262122.6ae83050_at_posting.google.com...Received on Sun May 02 2004 - 15:00:40 CDT
> 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