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: [OT] is there a way to get the server MAC address through sql statement ?

Re: [OT] is there a way to get the server MAC address through sql statement ?

From: Douglas Hawthorne <DouglasHawthorne_at_yahoo.com.au>
Date: Thu, 04 Mar 2004 10:27:48 GMT
Message-ID: <EwD1c.86657$Wa.70141@news-server.bigpond.net.au>


"srivenu" <srivenu_at_hotmail.com> wrote in message news:1a68177.0402292343.2e4f7ce0_at_posting.google.com...
> > The problem with this code is that it returns the wrong answer even if
you
> > added extra code to extract the MAC address from the output stream. The
> > "arp -a" command may return some or all of the MAC addresses of the
server's
> > neighbours on a LAN segment but not the MAC address of its interface
card.
> > If you want to use this method, employ the "ipconfig /all" command for
> > Windows, or the "ifconfig -a" command for Linux.
>
> Douglas,
> I think ifconfig -a on Solaris will return the MAC address only if run as
root.
> i think you can use arp `hostname` to get the MAC for the server.
> regards
> Srivenu

Srivenu,

This is no longer an Oracle question.

On the SUNOS 5.8 system I have access to, neither the arp nor the ifconfig commands are available to the non-administrators.

In some cases, it is possible to get the MAC address via arp x.x.x.x command. IF you are running the command on a host that is on the same LAN segment as the Oracle server AND IF that host IS NOT the Oracle server, then the command will return the MAC address of the server.

However, running the arp command on the Oracle server does not return the MAC address for the server itself. The purpose of ARP (see RFC 826) is to translate an IP address into a MAC address so that the sender can transmit the message over the LAN segment. If the IP address is that of the sender, then there is no need to do a translation because the TCP/IP stack knows its own set of IP addresses. Thus, it will avoid the overhead of sending a message over the LAN segment to itself.

Douglas Hawthorne Received on Thu Mar 04 2004 - 04:27:48 CST

Original text of this message

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