cancel
Showing results for 
Search instead for 
Did you mean: 

SA17: How to get the mac-address of the user on the server ?

1,426

Hi,

On the server, you can get the user's ip-address using connection_property('NodeAddress').

Question: how on the server side (for example, in a procedure) to get the mac-address of the user ? After all, it is in the tcp/ip packet, so it can be obtained somehow ...

Accepted Solutions (0)

Answers (1)

Answers (1)

johnsmirnios
Participant

The server never sees the MAC address because that's all handled by the TCP stack. If the client is on the local network or subnet, you could invoke the 'arp' command via xp_cmdshell() to get a MAC address. If the client is not on the local network, there's no way to get the client's MAC address at all. At best you could get the MAC address of the closest router. That address is known to the TCP/IP stack but not the server. You could possibly deduce it using 'route' and/or 'traceroute'.