如何通过存储过程获取当前系统macaddress [英] how to get current system macaddress by stored procedure

查看:83
本文介绍了如何通过存储过程获取当前系统macaddress的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我正在寻找通过sql存储过程获取当前系统的mac地址的方法。

我通过google搜索找到了以下代码,但我不知道这段代码是做什么的:



Hi there,

I'm looking for a way to get the mac address of the current system by sql stored procedure.
I have found the following code by googling a lot, but i could not know what does this code do :

declare @t table
(
i uniqueidentifier default newsequentialid(),
m as cast(i as char(36))
)

insert into @t default values;

select
    substring(m,25,2) + '-' +
    substring(m,27,2) + '-' +
    substring(m,29,2) + '-' +
    substring(m,31,2) + '-' +
    substring(m,33,2) + '-' +
    substring(m,35,2) AS MacAddress
FROM @t





还有更好的办法吗?



Is there any better way ?

推荐答案

不能


你需要用.net语言编写代码(物理地址类 [ ^ ])或批处理/脚本(< a href =http://community.spiceworks.com/scripts/show/664-get-remote-mac-address>获取远程MAC地址 [ ^ ])
You can't get mac adrress of client computer via SQL stored procedure!

You need to write code in .net language (PhysicalAddress Class[^]) or batch/script (Get Remote MAC Address[^])


这篇关于如何通过存储过程获取当前系统macaddress的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆