This is a discussion on SQL to get IP and OS within the Oracle Database forums, part of the Database Server Software category; --> Hello, I am using Oracle 10gR2 on Windows 2003 Server. Is it possible to retrieve the host's IP address ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello, I am using Oracle 10gR2 on Windows 2003 Server. Is it possible to retrieve the host's IP address and its OS version using a sql statement? I know that I can get the host_name from v$instance, and I can get the OS from the v$version, but I need more that just "Windows" for the OS. I'm looking for something like "Windows 2003 Server". Any ideas? Thanks in adavance! Jeff |
| |||
| On Thu, 05 Jul 2007 11:54:51 -0700, Jeff B <jbisch1@yahoo.com> wrote: >Hello, > > I am using Oracle 10gR2 on Windows 2003 Server. Is it possible to >retrieve the host's IP address and its OS version using a sql >statement? I know that I can get the host_name from v$instance, and I >can get the OS from the v$version, but I need more that just "Windows" >for the OS. I'm looking for something like "Windows 2003 Server". > Is that client's IP or db IP? db IP and OS are static, u can just store it in some table. ........ We run Oracle 9iR2,10gR1/2 on RH4/RH3 and Solaris 10 (Sparc) remove NSPAM to email |
| |||
| On Thu, 05 Jul 2007 11:54:51 -0700, Jeff B <jbisch1@yahoo.com> wrote: >Hello, > > I am using Oracle 10gR2 on Windows 2003 Server. Is it possible to >retrieve the host's IP address and its OS version using a sql >statement? I know that I can get the host_name from v$instance, and I >can get the OS from the v$version, but I need more that just "Windows" >for the OS. I'm looking for something like "Windows 2003 Server". > > Any ideas? > >Thanks in adavance! >Jeff Before applying kludges recommended by Netcomrade look into the sys_context function and the dbms_utility package (or that manual). I know there are calls in dbms_utility. -- Sybrand Bakker Senior Oracle DBA |
| |||
| On Jul 5, 5:12 pm, sybra...@hccnet.nl wrote: > On Thu, 05 Jul 2007 11:54:51 -0700, Jeff B <jbis...@yahoo.com> wrote: > >Hello, > > > I am using Oracle 10gR2 on Windows 2003 Server. Is it possible to > >retrieve the host's IP address and its OS version using a sql > >statement? I know that I can get the host_name from v$instance, and I > >can get the OS from the v$version, but I need more that just "Windows" > >for the OS. I'm looking for something like "Windows 2003 Server". > > > Any ideas? > > >Thanks in adavance! > >Jeff > > Before applying kludges recommended by Netcomrade look into the > sys_context function and the dbms_utility package (or that manual). I > know there are calls in dbms_utility. > > -- > Sybrand Bakker > Senior Oracle DBA Jeff, you can get the host name and IP via the Oracle supplied package utl_inaddr. There are numerous dictionary and v$ views that contain information that potentially could provide enough information to ID the OS. Take a look at product_component_version, database_properties, v$version, v $instance, and v$database. HTH -- Mark D Powell -- |
| ||||
| Jeff B wrote: > Hello, > > I am using Oracle 10gR2 on Windows 2003 Server. Is it possible to > retrieve the host's IP address and its OS version using a sql > statement? I know that I can get the host_name from v$instance, and I > can get the OS from the v$version, but I need more that just "Windows" > for the OS. I'm looking for something like "Windows 2003 Server". > > Any ideas? > > Thanks in adavance! > Jeff SELECT sys_context('USERENV', 'IP_ADDRESS') FROM dual; SELECT dbms_utility.port_string FROM dual; If you want something else you'll need to explicitly describe it. -- Daniel A. Morgan University of Washington damorgan@x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.org |